aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-glue.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-09-30 13:13:23 +0000
committerstephan <stephan@noemail.net>2023-09-30 13:13:23 +0000
commit8f43696c8a480890a69d4e7101f148980cf7b606 (patch)
tree155f651eccf0fc12da23544f1b6dc072bceab47d /ext/wasm/api/sqlite3-api-glue.js
parent9ac7e2d0fc4ca021866fca748082fb9060456ae0 (diff)
downloadsqlite-8f43696c8a480890a69d4e7101f148980cf7b606.tar.gz
sqlite-8f43696c8a480890a69d4e7101f148980cf7b606.zip
Correct an undefined-value deref in the JS bindings, triggered by passing invalid args and then tripping over an undefined value while trying to report that. Reported in [forum:dd42df144651d779|forum post dd42df144651d779].
FossilOrigin-Name: fd4632540717c4771ac9ae1fe4400091a2cd0553639bf809abaf4ecbc54de4f0
Diffstat (limited to 'ext/wasm/api/sqlite3-api-glue.js')
-rw-r--r--ext/wasm/api/sqlite3-api-glue.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-api-glue.js b/ext/wasm/api/sqlite3-api-glue.js
index 60050461c..f23a02366 100644
--- a/ext/wasm/api/sqlite3-api-glue.js
+++ b/ext/wasm/api/sqlite3-api-glue.js
@@ -888,9 +888,9 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
consistency with non-special-case wrappings.
*/
const __dbArgcMismatch = (pDb,f,n)=>{
- return sqlite3.util.sqlite3_wasm_db_error(pDb, capi.SQLITE_MISUSE,
- f+"() requires "+n+" argument"+
- (1===n?"":'s')+".");
+ return util.sqlite3_wasm_db_error(pDb, capi.SQLITE_MISUSE,
+ f+"() requires "+n+" argument"+
+ (1===n?"":'s')+".");
};
/** Code duplication reducer for functions which take an encoding