Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ee46980

Browse files
author
Michael Meskes
committed
Fix float parsing in ecpg INFORMIX mode.
1 parent 97ba7b8 commit ee46980

File tree

1 file changed

+3
-2
lines changed
  • src/interfaces/ecpg/ecpglib

1 file changed

+3
-2
lines changed

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
5757
/* skip invalid characters */
5858
do {
5959
(*scan_length)++;
60-
} while (**scan_length != ' ' && **scan_length != '\0' && isdigit(**scan_length));
60+
} while (isdigit(**scan_length));
6161
return false;
6262
}
6363

@@ -401,7 +401,8 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
401401
if (isarray && *scan_length == '"')
402402
scan_length++;
403403

404-
if (garbage_left(isarray, &scan_length, compat))
404+
/* no special INFORMIX treatment for floats */
405+
if (garbage_left(isarray, &scan_length, ECPG_COMPAT_PGSQL))
405406
{
406407
ecpg_raise(lineno, ECPG_FLOAT_FORMAT,
407408
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);

0 commit comments

Comments
 (0)