[Issue 627] Concatenation of strings to string arrays with ~ corrupts data
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 29 01:03:38 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=627
------- Comment #1 from lio at lunesu.com 2007-01-29 03:03 -------
//foo ~ cast(char[])"foo"
0x004020a9 6a08 push 08
0x004020ab ff358ce04000 push dword ptr [_TMP0+00000004 (0040e08c)]
0x004020b1 ff3588e04000 push dword ptr [_TMP0 (0040e088)]
0x004020b7 ff75dc push dword ptr [ebp-24]
0x004020ba ff75d8 push dword ptr [foo]
0x004020bd e8e6070000 call __d_arraycat (004028a8)
extern (C)
byte[] _d_arraycat(byte[] x, byte[] y, size_t size)
The "08" is the size of the data to be appended, char[].sizeof
Apparently, the AA is being treated as a normal array.
--
More information about the Digitalmars-d-bugs
mailing list