mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
do not try float conversion without precision
This commit is contained in:
parent
da6c54a517
commit
c7a882378e
1 changed files with 5 additions and 3 deletions
8
dbdimp.c
8
dbdimp.c
|
@ -169,9 +169,11 @@ sqlite_is_number(pTHX_ const char *v)
|
|||
|
||||
sprintf(str, "%i", atoi(v));
|
||||
if (strEQ(str, v)) return 1;
|
||||
sprintf(format, "%%.%df", precision);
|
||||
sprintf(str, format, atof(v));
|
||||
if (strEQ(str, v)) return 2;
|
||||
if (precision) {
|
||||
sprintf(format, "%%.%df", precision);
|
||||
sprintf(str, format, atof(v));
|
||||
if (strEQ(str, v)) return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue