From: Jay Freeman (saurik) Date: Sat, 9 Jan 2016 17:48:43 +0000 (-0800) Subject: Require strings used as characters to be one byte. X-Git-Tag: v0.9.590~16 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/387bffd8628b9f0478dc517b35ec416afba6fd69?ds=inline;hp=284f434e679db9480ba276b2e98d3fe5aeffa23b Require strings used as characters to be one byte. --- diff --git a/Execute.cpp b/Execute.cpp index 3f00a87..6df536e 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -750,6 +750,7 @@ void Primitive::PoolFFI(CYPool *pool, JSContextRef context, ffi_type *ffi, CYJSString script(context, value); auto string(CYCastUTF16String(script)); _assert(string.size == 1); + _assert((string.data[0] & 0xff) == string.data[0]); *reinterpret_cast(data) = string.data[0]; } }