Skip to content

Commit 3ca3594

Browse files
author
Michael Meskes
committed
Fixed array checking code for "unsigned long long" datatypes in libecpg.
1 parent 013f423 commit 3ca3594

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
374374
#ifdef HAVE_STRTOULL
375375
case ECPGt_unsigned_long_long:
376376
*((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10);
377-
if ((isarray && *scan_length != ',' && *scan_length != '}')
378-
|| (!isarray && !(INFORMIX_MODE(compat) && *scan_length == '.') && *scan_length != '\0' && *scan_length != ' ')) /* Garbage left */
377+
if (garbage_left(isarray, scan_length, compat))
379378
{
380379
ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
381380
return (false);

0 commit comments

Comments
 (0)