We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e37a10 commit 713c2f4Copy full SHA for 713c2f4
src/library.js
@@ -62,7 +62,6 @@ addToLibrary({
62
}
63
#endif
64
HEAPU8.fill(0, address, address + size);
65
- return address;
66
},
67
68
#if SAFE_HEAP
@@ -2278,8 +2277,8 @@ addToLibrary({
2278
2277
#if hasExportedSymbol('emscripten_builtin_memalign')
2279
size = alignMemory(size, {{{ WASM_PAGE_SIZE }}});
2280
var ptr = _emscripten_builtin_memalign({{{ WASM_PAGE_SIZE }}}, size);
2281
- if (!ptr) return 0;
2282
- return zeroMemory(ptr, size);
+ if (ptr) zeroMemory(ptr, size);
+ return ptr;
2283
#elif ASSERTIONS
2284
abort('internal error: mmapAlloc called but `emscripten_builtin_memalign` native symbol not exported');
2285
#else
0 commit comments