diff options
author | stephan <stephan@noemail.net> | 2022-08-29 18:58:38 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-08-29 18:58:38 +0000 |
commit | 2f06bf2541f651be4f0fdcaf2329f25b4eb2f3e5 (patch) | |
tree | 4c616b67525750a38374ee8ab895e7ea344e8169 /ext/wasm/api/sqlite3-api-oo1.js | |
parent | 49a785fa34753687c00f3a492700efbdce0535aa (diff) | |
download | sqlite-2f06bf2541f651be4f0fdcaf2329f25b4eb2f3e5.tar.gz sqlite-2f06bf2541f651be4f0fdcaf2329f25b4eb2f3e5.zip |
Lots of tweaking in batch-runner.js. Minor internal API update in OO #1 API.
FossilOrigin-Name: 24b82b9504db3d8e1335c2300b133f897dc1a541026dc24be5b0ffd8be66d977
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index 5d4b19b5a..2cfb47886 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -540,7 +540,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ if(isTA) wasm.heap8().set(arg.sql, pSql); else wasm.jstrcpy(arg.sql, wasm.heap8(), pSql, sqlByteLen, false); wasm.setMemValue(pSql + sqlByteLen, 0/*NUL terminator*/); - while(wasm.getMemValue(pSql, 'i8') + while(pSql && wasm.getMemValue(pSql, 'i8') /* Maintenance reminder:^^^ _must_ be 'i8' or else we will very likely cause an endless loop. What that's doing is checking for a terminating NUL byte. If we @@ -548,8 +548,8 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ around the NUL terminator, and get stuck in and endless loop at the end of the SQL, endlessly re-preparing an empty statement. */ ){ - wasm.setMemValue(ppStmt, 0, wasm.ptrIR); - wasm.setMemValue(pzTail, 0, wasm.ptrIR); + wasm.setPtrValue(ppStmt, 0); + wasm.setPtrValue(pzTail, 0); DB.checkRc(this, capi.sqlite3_prepare_v3( this.pointer, pSql, sqlByteLen, 0, ppStmt, pzTail )); |