summaryrefslogtreecommitdiff
path: root/NW4RTools/OutputStream.cs
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-08 05:17:56 +0100
committerTreeki <treeki@gmail.com>2011-03-08 05:17:56 +0100
commit7d391e33a0b3d9793c95fce832abb2c6d9002186 (patch)
tree075f8ec6272ad3ea12be44a8c2083f89b0d55228 /NW4RTools/OutputStream.cs
parente962fd89af865d6e01522e9752f5fbd855ce128a (diff)
downloadnw4rtools-7d391e33a0b3d9793c95fce832abb2c6d9002186.tar.gz
nw4rtools-7d391e33a0b3d9793c95fce832abb2c6d9002186.zip
late night commit! obj importer is basic but working. also, tidied up DL stuff
Diffstat (limited to 'NW4RTools/OutputStream.cs')
-rw-r--r--NW4RTools/OutputStream.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/NW4RTools/OutputStream.cs b/NW4RTools/OutputStream.cs
index e934158..2243d90 100644
--- a/NW4RTools/OutputStream.cs
+++ b/NW4RTools/OutputStream.cs
@@ -49,7 +49,7 @@ namespace NW4RTools {
}
public void AddPadding(int count) {
- if (count == 0)
+ if (count <= 0)
return;
else if (count == 1)
WriteByte(0);
@@ -58,6 +58,10 @@ namespace NW4RTools {
WriteByte(0);
}
+ public void PadToSize(int size) {
+ AddPadding(size - Position);
+ }
+
public void WriteBytes(byte[] data) {
BaseStream.Write(data, 0, data.Length);
}