]> git.saurik.com Git - cycript.git/commitdiff
Require strings used as characters to be one byte.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 9 Jan 2016 17:48:43 +0000 (09:48 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 9 Jan 2016 17:48:43 +0000 (09:48 -0800)
Execute.cpp

index 3f00a87e95abdaee802af48b707b3b4efa0a18cf..6df536e476a10c97c0e14d16bb676d85fe65603d 100644 (file)
@@ -750,6 +750,7 @@ void Primitive<char>::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<char *>(data) = string.data[0];
     }
 }