summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2016-08-01 06:36:27 +0200
committerMichael Meskes <meskes@postgresql.org>2016-08-01 15:08:36 +0200
commitc15f502b642386ea9aaf7f9cb0c5c07ef1c9f27b (patch)
tree59ba067b3af7349b7daba094897a61e6a4aa1bbb /src
parent366f4a96248dc85a37b17c78ce41d2a531377ba0 (diff)
Fixed array checking code for "unsigned long long" datatypes in libecpg.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index a04da1a9962..179897167a3 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);