diff options
author | Jb Evain <jb@evain.net> | 2017-03-29 23:26:23 +0300 |
---|---|---|
committer | Jb Evain <jb@evain.net> | 2017-03-29 23:26:23 +0300 |
commit | f8b5340adddc2688b6bbe0920860f0b548042025 (patch) | |
tree | 25d3287cb32cf346e19b940b16b219187f6a3944 | |
parent | be6db1feeeef9c56c2eb18449e695f563f1d957b (diff) |
Revert "Zero stream before writing a ReadWrite module. Fix #368"
This reverts commit be6db1feeeef9c56c2eb18449e695f563f1d957b.
-rw-r--r-- | Mono.Cecil/ModuleDefinition.cs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Mono.Cecil/ModuleDefinition.cs b/Mono.Cecil/ModuleDefinition.cs index 5421298..543a155 100644 --- a/Mono.Cecil/ModuleDefinition.cs +++ b/Mono.Cecil/ModuleDefinition.cs @@ -1143,7 +1143,7 @@ namespace Mono.Cecil { throw new InvalidOperationException (); var image_stream = Image.Stream.value; - image_stream.ZeroStream (); + image_stream.Position = 0; Write (image_stream, parameters); } @@ -1338,12 +1338,6 @@ namespace Mono.Cecil { return memory.ToArray (); } - public static void ZeroStream (this Stream self) - { - self.Position = 0; - self.SetLength (0); - } - public static void Read (object o) { } |