@bloomengine/engine 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native/ios/src/lib.rs +6 -1
- package/package.json +1 -1
package/native/ios/src/lib.rs
CHANGED
|
@@ -2038,7 +2038,12 @@ pub extern "C" fn bloom_read_file(path_ptr: *const u8) -> *const u8 {
|
|
|
2038
2038
|
ptr
|
|
2039
2039
|
}
|
|
2040
2040
|
}
|
|
2041
|
-
|
|
2041
|
+
// A null pointer would NaN-box into a string-typed JS value pointing at
|
|
2042
|
+
// address 0; `.length`/`.charCodeAt` then dereference the header at a
|
|
2043
|
+
// negative offset and segfault. Return a valid empty Perry string so
|
|
2044
|
+
// callers that probe via `data.length === 0` (e.g. level discovery)
|
|
2045
|
+
// are safe. Mirrors the macOS native crate.
|
|
2046
|
+
Err(_) => alloc_perry_string(""),
|
|
2042
2047
|
}
|
|
2043
2048
|
}
|
|
2044
2049
|
|