I have the following variable in my code:
char display_string[41];
When I try to execute the following statement:
StrPrintF(display_string, "%s:%c:%s", "str1", 'R', "str");
I get an error: "my application (version) has just written directly to
memory manager data structures."
The problem seems to have something to do with the 'R' character I am trying
to substitute, because:
StrPrintF(display_string, "%s:%s:%s", "str1", "R", "str2");
works correctly. Interestingly, if I do this:
char c = 'R';
StrPrintF(display_string, "%s:%c:%s", "str1", c, "str2");
it works fine.
This is all using the 3.5 color (non-debug) ROM. I use GCC, and compile with
the -O2 option, if it matters. According to the doc. for
StrPrintF/StrVPrintF, the %c format should be handled correctly. Anybody
know what's going on? Thanks.
Tom
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/