From 88790874612f8af47efec72beef53b1b9964f319 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 12 Feb 2003 20:44:26 +0000 Subject: [PATCH] MFH --- ext/fbsql/php_fbsql.c | 7 ++++--- main/snprintf.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 75a6e14b98..fda842e7bf 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -2275,7 +2275,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng phpfbestrdup(b, length, value); } break; - +#ifdef FB_TinyInteger case FB_TinyInteger: { short int v = *((short int*)data); @@ -2284,7 +2284,8 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng phpfbestrdup(b, length, value); } break; - +#endif +#ifdef FB_LongInteger case FB_LongInteger: { FBLongInteger v = *((FBLongInteger*)data); @@ -2297,7 +2298,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng phpfbestrdup(b, length, value); } break; - +#endif case FB_SmallInteger: { short v = *((short*)data); diff --git a/main/snprintf.c b/main/snprintf.c index a8f7d75f60..fa5a07cc45 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -298,7 +298,7 @@ ap_php_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf) while (p1 < &buf[NDIG]) *p++ = *p1++; } else if (arg > 0) { - while ((fj = arg * 10) < 1) { + while ((fj = arg * 10) < 1 && (r2 * -1) < ndigits) { arg = fj; r2--; } -- 2.40.0