summaryrefslogtreecommitdiff
path: root/NW4RTools/OutputStream.cs
diff options
context:
space:
mode:
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);
}