Skip to content

Commit 3fb730c

Browse files
authored
Fix off-by-one error in create_function
Fix occasional crashes caused by reading past the end of the arguments array.
1 parent 3bd3f81 commit 3fb730c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coffee/api.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ class Database
448448
wrapped_func = (cx, argc, argv) ->
449449
# Parse the args from sqlite into JS objects
450450
args = []
451-
for i in [0..argc]
451+
for i in [0...argc]
452452
value_ptr = getValue(argv+(4*i), 'i32')
453453
value_type = sqlite3_value_type(value_ptr)
454454
data_func = switch

0 commit comments

Comments
 (0)