From: Michael Meskes Date: Tue, 26 Nov 2013 16:16:39 +0000 (+0100) Subject: ECPG: Fix offset to NULL/size indicator array. X-Git-Tag: REL9_3_2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a387f56cebe3b61172e196d6b8e3068b7b18919a;p=postgresql ECPG: Fix offset to NULL/size indicator array. Patch by Boszormenyi Zoltan --- diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index dcccd924ec..5f9a3d4604 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -526,15 +526,15 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, { case ECPGt_short: case ECPGt_unsigned_short: - *((short *) (ind + offset * act_tuple)) = variable->len; + *((short *) (ind + ind_offset * act_tuple)) = variable->len; break; case ECPGt_int: case ECPGt_unsigned_int: - *((int *) (ind + offset * act_tuple)) = variable->len; + *((int *) (ind + ind_offset * act_tuple)) = variable->len; break; case ECPGt_long: case ECPGt_unsigned_long: - *((long *) (ind + offset * act_tuple)) = variable->len; + *((long *) (ind + ind_offset * act_tuple)) = variable->len; break; #ifdef HAVE_LONG_LONG_INT case ECPGt_long_long: