Skip to content

Commit

Permalink
Fix reading 32-bit int from sqlite (#167).
Browse files Browse the repository at this point in the history
  • Loading branch information
andyli committed Dec 19, 2017
1 parent 414af43 commit 83abdfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
all : renamed TAG_BITS to NEKO_TAG_BITS
all : add NEKO_JIT_DISABLE and NEKO_JIT_DEBUG CMake options
all : VS2015 and 2017 compatiblity (#133 #172)
sqlite : fixed reading 32-bit int from sqlite (#167)

2016-05-08 : 2.1.0
all : switched to use CMake for building (#122)
Expand Down
4 changes: 2 additions & 2 deletions libs/sqlite/sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static value result_next( value v ) {
if( r->bools[i] )
f = alloc_bool(sqlite3_column_int(r->r,i));
else
f = alloc_int(sqlite3_column_int(r->r,i));
f = alloc_best_int(sqlite3_column_int(r->r,i));
break;
case SQLITE_FLOAT:
f = alloc_float(sqlite3_column_double(r->r,i));
Expand Down Expand Up @@ -300,7 +300,7 @@ static value result_get_int( value v, value n ) {
result_next(v);
if( r->done )
neko_error();
return alloc_int(sqlite3_column_int(r->r,val_int(n)));
return alloc_best_int(sqlite3_column_int(r->r,val_int(n)));
}

/**
Expand Down

0 comments on commit 83abdfc

Please sign in to comment.