diff options
author | Michael Meskes <meskes@postgresql.org> | 2016-08-01 06:36:27 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2016-08-01 15:08:59 +0200 |
commit | 3ca359426c09d4a928f4603f531bed2f46648bcb (patch) | |
tree | ce4763efc98b3e4c78ee8e6cf68ad533525e7802 | |
parent | 013f423729a8e7b75bbb80db5212fe320a146343 (diff) |
Fixed array checking code for "unsigned long long" datatypes in libecpg.
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 58b8df271e3..75391ae6d17 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -374,8 +374,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, #ifdef HAVE_STRTOULL case ECPGt_unsigned_long_long: *((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10); - if ((isarray && *scan_length != ',' && *scan_length != '}') - || (!isarray && !(INFORMIX_MODE(compat) && *scan_length == '.') && *scan_length != '\0' && *scan_length != ' ')) /* Garbage left */ + if (garbage_left(isarray, scan_length, compat)) { ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); |