1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

applied a patch to fix condition in sqlite_set_result (Yuriy Kaminskiy)

This commit is contained in:
Kenichi Ishigaki 2012-03-24 13:49:48 +00:00
parent 82d08f1d0f
commit 0970b639ba

View file

@ -147,7 +147,7 @@ sqlite_set_result(pTHX_ sqlite3_context *context, SV *result, int is_error)
}
else if ( SvIOK(result) ) {
sqlite3_result_int( context, SvIV(result));
} else if ( !is_error && SvIOK(result) ) {
} else if ( SvNOK(result) && ( sizeof(NV) == sizeof(double) || SvNVX(result) == (double) SvNVX(result) ) ) {
sqlite3_result_double( context, SvNV(result));
} else {
s = SvPV(result, len);