Gerald K. Dobiasovsky wrote in message <380f6e5d@news.povray.org>...
>BTW I found another bug in the above function.
>Try a string ending with '\\' either in a file write or in one of the
>console output streams:
>Most of the time one gets garbage appended to the string,
>because the pointer to the last character in the source string is
>incremented even if this character is the null-byte.
I found a fix for this bug (haven't been able to test it yet, though).
In Parse_Formatted_String in file express.c, replace the line
while (*src != '\0')
with the line
while (*dest != '\0')
and the line
case '\0': *dest=0x5c; break;
with the line
case '\0': *dest=0x5c; *(dest+1) = '\0'; break;
and increast the size of the 'buff' array to MAX_STRING_INDEX*2+1
This should solve the problem.
Mark
Post a reply to this message
|