mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Since the ampersand is used as an escape character, it is repeated when it actually appears in the string. Unfortunately, this requires a one character lookahead which could result in reading beyond the string if this ampersand is the last character (which would be malformed, but possible). To avoid an out of bounds read, this is now qualified by the string length. Trailing ampersands will now be ignored without issue.