{"push_id":863134976,"size":1,"distinct_size":1,"ref":"refs/heads/bugfix-15440","head":"95ed6717477305fc8e878eaefffbaf0ba92437fc","before":"eae55df73c70ae8baf1c57fe6aa4164c343adb41","commits":[{"sha":"95ed6717477305fc8e878eaefffbaf0ba92437fc","author":{"email":"c39cdf47ebd3805046046e3cf5e8a60cea038498@livecode.com","name":"Peter TB Brett"},"message":"[Bug 15440] lc-compile: Permit string literals with embedded nuls\n\nInternally, lc-compile uses nul-terminated strings.  However, both the\ncompiled module file format and the LiveCode runtime allow strings to\ncontain nuls.\n\nPreviously, `\"\\u{0}\"` evaluated to the empty string.  This was because\n`UnescapeStringLiteral()` faithfully decoded `\\u{0}` to the byte\nstring `{0x00, 0x00}`, which interpreted as a nul-terminated string is\nempty.\n\nWhen outputting a module file, compiler internal strings are converted\nto libfoundation `MCString`.  So the nul-terminated strings used\ninternally by the compiler are never exposed (apart possibly via error\nor diagnostic messages).\n\nA trivial fix is therefore to use Modified UTF-8 encoding for\ncompiler-internal strings, where U+0000 is encoded as `{0xc0, 0x80}`.","distinct":true,"url":"https://api.github.com/repos/peter-b/livecode/commits/95ed6717477305fc8e878eaefffbaf0ba92437fc"}]}