Fix embedded NUL in literal strings.

Literal strings were not conforming to Mono's strict "NUL is end-of-string" rules, so a file with an embedded NUL within a string literal would let the NUL be part of the string. Mostly academic, because it's probably not possible to upload a file with an embedded NUL to SL, but fixed it regardless.
This commit is contained in:
Sei Lisa 2016-11-18 16:58:48 +01:00
parent da7b98b4ba
commit 52c38b0980

View file

@ -530,7 +530,7 @@ class parser(object):
if is_string:
self.pos += 1
return ('STRING_VALUE', strliteral.decode('utf8'))
return ('STRING_VALUE', lslfuncs.zstr(strliteral.decode('utf8')))
# fall through (to consider the L or to ignore the ")
if isalpha_(c):