[PATCH] Fix libstdc++/5579
Paolo Carlini
pcarlini@unitus.it
Sun Feb 3 11:48:00 GMT 2002
Nathan Myers wrote:
> Can you give examples of formats and sequences that fail, where
> you're not sure if they should?
>
> In general, at the place in the format where it says the symbol
> should be, it should expect to find either the first character
> of the symbol, or the first character of the next component of the
> format. If the symbol is the last thing in the format (really the
> last thing, no "rest of the sign" left to read) then if it's optional
> you don't try to read it.
While we are at it, another thing which occurs to me reading your reply.
In my second fix (which I think is much closer to the correct one) if it's
optional (that is "charbase" is false) I don't try to read the symbol if its the
last in the format but also if it's but last and the following field has value
"none". This latter case should not be considered, right?
Thanks,
Paolo.
More information about the Libstdc++
mailing list