From: Ard Biesheuvel Date: Thu, 13 Jan 2005 21:22:13 +0000 (+0000) Subject: Fixed unregistered bug: corrupted 32-bit LONGs on 64-bit systems X-Git-Tag: php-4.3.11RC1~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c8d41a8fcd45cbbd4cf1691ece85bcf2d28a701;p=php Fixed unregistered bug: corrupted 32-bit LONGs on 64-bit systems --- diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index e51f37ce9f..6372ebb7b4 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -1802,9 +1802,9 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, int sca short j; long n, f = 1; if ( (type & ~1) == SQL_SHORT) { - n = (long) *(short *) (data); + n = *(short *) data; }else { - n = (long) *(long *) (data); + n = *(ISC_LONG *) data; } for (j = 0; j < -scale; j++) { f *= 10; @@ -1821,9 +1821,9 @@ static int _php_ibase_var_zval(zval *val, void *data, int type, int len, int sca } else { Z_TYPE_P(val) = IS_LONG; if ( (type & ~1) == SQL_SHORT) { - Z_LVAL_P(val) = *(short *) (data); + Z_LVAL_P(val) = *(short *) data; }else{ - Z_LVAL_P(val) = *(long *) (data); + Z_LVAL_P(val) = *(ISC_LONG *) data; } } break;