Skip to content

Commit 049dab0

Browse files
author
Michael Meskes
committed
Fix float parsing in ecpg INFORMIX mode.
1 parent a43cd42 commit 049dab0

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
@@ -59,7 +59,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
5959
/* skip invalid characters */
6060
do {
6161
(*scan_length)++;
62-
} while (**scan_length != ' ' && **scan_length != '\0' && isdigit(**scan_length));
62+
} while (isdigit(**scan_length));
6363
return false;
6464
}
6565

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

406-
if (garbage_left(isarray, &scan_length, compat))
406+
/* no special INFORMIX treatment for floats */
407+
if (garbage_left(isarray, &scan_length, ECPG_COMPAT_PGSQL))
407408
{
408409
ecpg_raise(lineno, ECPG_FLOAT_FORMAT,
409410
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy