webgpu: fix cstring as parameter not loading correctly

This commit is contained in:
Laytan Laats
2025-01-09 17:29:31 +01:00
parent cabc76d9cb
commit 1511162b0a
2 changed files with 16 additions and 13 deletions
+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;
}