]> git.saurik.com Git - cycript.git/blobdiff - Library.cpp
Fix crash when trying to use specifier without int.
[cycript.git] / Library.cpp
index 5be04f4b03a5422b9c9e0a7cec65046ed7d75fbb..74df5029d99e83216df8e0128f78a1c273bb37cb 100644 (file)
@@ -210,28 +210,6 @@ CYUTF8String CYPoolCode(CYPool &pool, CYUTF8String code) {
     return $pool.strdup(str.str().c_str());
 }
 
-extern "C" bool CydgetMemoryParse(const uint16_t **data, size_t *size) {
-    CYPool pool;
-
-    CYUTF8String utf8(CYPoolUTF8String(pool, CYUTF16String(*data, *size)));
-    try {
-        utf8 = CYPoolCode(pool, utf8);
-    } catch (const CYException &) {
-        *data = NULL;
-        *size = 0;
-        return false;
-    }
-
-    CYUTF16String utf16(CYPoolUTF16String(pool, CYUTF8String(utf8.data, utf8.size)));
-    size_t bytes(utf16.size * sizeof(uint16_t));
-    uint16_t *copy(reinterpret_cast<uint16_t *>(malloc(bytes)));
-    memcpy(copy, utf16.data, bytes);
-
-    *data = copy;
-    *size = utf16.size;
-    return true;
-}
-
 CYPool &CYGetGlobalPool() {
     static CYPool pool;
     return pool;