webgpu: fix cstring as parameter not loading correctly

This commit is contained in:
Laytan Laats committed 2025-01-09 17:29:31 +01:00
1 parent cabc76d9cb
commit 1511162b0a
2 files changed
+16 -13

No files matched your search

+4 -1
View File
@@ -110,7 +110,10 @@ class WasmMemoryInterface {
}
loadCstring(ptr) {
const start = this.loadPtr(ptr);
return this.loadCstringDirect(this.loadPtr(ptr));
}
loadCstringDirect(start) {
if (start == 0) {
return null;
}