diff options
Diffstat (limited to 'ext/wasm/sqlite3-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/sqlite3-opfs-async-proxy.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/wasm/sqlite3-opfs-async-proxy.js b/ext/wasm/sqlite3-opfs-async-proxy.js index 58498e006..00b402556 100644 --- a/ext/wasm/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/sqlite3-opfs-async-proxy.js @@ -260,7 +260,7 @@ const vfsAsyncImpls = { const fh = __openFiles[fid]; try{ const aRead = new Uint8Array(fh.sab, 0, n); - const nRead = fh.accessHandle.read(aRead, {at: offset}); + const nRead = fh.accessHandle.read(aRead, {at: Number(offset)}); if(nRead < n){/* Zero-fill remaining bytes */ new Uint8Array(fh.sab).fill(0, nRead, n); rc = state.sq3Codes.SQLITE_IOERR_SHORT_READ; @@ -302,7 +302,8 @@ const vfsAsyncImpls = { const fh = __openFiles[fid]; try{ affirmNotRO('xWrite', fh); - const nOut = fh.accessHandle.write(new Uint8Array(fh.sab, 0, n), {at: offset}); + const nOut = fh.accessHandle.write(new Uint8Array(fh.sab, 0, n), + {at: Number(offset)}); rc = (nOut===n) ? 0 : state.sq3Codes.SQLITE_IOERR_WRITE; }catch(e){ error("xWrite():",e,fh); |