At 02:31 PM 8/8/2003, Todd Niec wrote:
Is there a bug in code warrior' STL string class's c_str() function.  It
seems like at times it returns a string that does not have a NUL
terminator.  This does not happen all the time.  If I explicitly store a
NUL character at the end of the string, I have no problems, but I don't
like the extra step.

This is likely related to small strings that can fit into the std::string object. There's an optimization to not do dynamic allocations for those strings, but the length calculation is slightly off. 9.2 will fix this; contact MW tech support to get an updated <string> header if you need this right now.


--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com



-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to