[Mono-bugs] [Bug 58462][Maj] Changed - ilasm literal value gets lost

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 26 May 2004 14:49:49 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ck@carlo-kok.com.

http://bugzilla.ximian.com/show_bug.cgi?id=58462

--- shadow/58462	2004-05-25 19:35:15.000000000 -0400
+++ shadow/58462.tmp.16840	2004-05-26 14:49:49.000000000 -0400
@@ -81,6 +81,28 @@
 value passed to PEAPI.Constant.AddValue does get written to the
 executable but  the end result (when decompiling with ildasm and
 monodis) is not right.
 
 ------- Additional Comments From jackson@ximian.com  2004-05-25 19:35 -------
 This is now fixed in CVS. Thanks for the report.
+
+------- Additional Comments From ck@carlo-kok.com  2004-05-26 14:49 -------
+Strings work now. But ints and floats don't. I found out why:
+MetaDataStream has a few Add() methods but they don't write out the
+size. like:
+    internal uint Add(byte val) {
+
+      uint ix = size;
+
++      Write((byte)1);
+      Write(val);
+
+      size = (uint)Seek(0,SeekOrigin.Current);
+
+      return ix;
+
+    }
+// Same for the Add() with sbyte, ushort, short, uint, int, ulong,
+long, float and double.
+
+Test:
+.field public literal static int32 test = 0x1234567;