diff options
author | Jb Evain <jb@evain.net> | 2017-01-11 04:21:05 +0300 |
---|---|---|
committer | Jb Evain <jb@evain.net> | 2017-01-11 04:21:05 +0300 |
commit | 60f09acbf0cf933f58e0dad1d2b107244a465a21 (patch) | |
tree | caa2088db235dbd0ac20b8425fb630408f568daa | |
parent | 270df84a7da8066dbbc3766e5c7d0c61ebe678ee (diff) |
Flush our streams before disposing them; Fix #312
-rw-r--r-- | Mono.Cecil.Cil/PortablePdb.cs | 1 | ||||
-rw-r--r-- | Mono.Cecil.PE/ImageWriter.cs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Mono.Cecil.Cil/PortablePdb.cs b/Mono.Cecil.Cil/PortablePdb.cs index a6859dc..4df8813 100644 --- a/Mono.Cecil.Cil/PortablePdb.cs +++ b/Mono.Cecil.Cil/PortablePdb.cs @@ -255,6 +255,7 @@ namespace Mono.Cecil.Cil { writer.WriteMetadataHeader (); writer.WriteMetadata (); + writer.Flush (); writer.stream.Dispose (); } diff --git a/Mono.Cecil.PE/ImageWriter.cs b/Mono.Cecil.PE/ImageWriter.cs index 95d39cb..c4f7e4f 100644 --- a/Mono.Cecil.PE/ImageWriter.cs +++ b/Mono.Cecil.PE/ImageWriter.cs @@ -678,6 +678,7 @@ namespace Mono.Cecil.PE { WriteRsrc (); if (reloc != null) WriteReloc (); + Flush (); } void BuildTextMap () |