I'm having a ridiculously lame C++ problem..
I've got a C++ function that returns a struct that I created. While running in the debugger, everything in the struct looks fine.
However, once I return the pointer and collect it in the other function, one of the fields in the struct is all mangled. I don't understand what the hell is going on.
Read on for more information.
(Edit: Solved.)
(Edit #2: Moved the details to a summary, it was breaking XML syndication X_x).
Here's the struct's contents BEFORE I return it:
- ti {title=0x0012dbc0 "Raspberry?Heart (VOCAL Version)" artist=0x0012dc48 "jun" album=0x0012dc00 "pop'n music 8 V-RARE SOUND TRACK 6" ...} trackInfo
+ title 0x0012dbc0 "Raspberry?Heart (VOCAL Version)" char *
+ artist 0x0012dc48 "jun" char *
+ album 0x0012dc00 "pop'n music 8 V-RARE SOUND TRACK 6" char *
+ duration 0xcccccccc
+ bitrate 0xcccccccc
Here's what it looks like *after* it's returned:
- ti 0x0012de0c {title=0x0012dbc0 "Raspberry?Heart (VOCAL Version)" artist=0x0012dc48 "Þ" album=0x0012dc00 "pop'n music 8 V-RARE SOUND TRACK 6" ...} trackInfo *
+ title 0x0012dbc0 "Raspberry?Heart (VOCAL Version)" char *
+ artist 0x0012dc48 "Þ" char *
+ album 0x0012dc00 "pop'n music 8 V-RARE SOUND TRACK 6" char *
+ duration 0xcccccccc
+ bitrate 0xcccccccc
As you can see, "artist" is totally mangled.
I don't understand why this is happening, and it's driving me up the wall. It ONLY happens on that one field, too.
I'm going to go kill myself now.

Leave a comment