cvs: php4 /ext/informix/
| From: | Danny Heijl | Date: | Wed, 10 May 2000 18:56:40 +0000 |
| Subject: | cvs: php4 /ext/informix/ | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14780@lists.php.net to get a copy of this message | ||
danny Wed May 10 20:56:40 2000 EDT
Modified files:
/php4/ext/informix ifx.ec
Log:
- fix for SQLLVARCHAR provided by Alan Shepherd. (Danny)
Index: php4/ext/informix/ifx.ec
diff -u php4/ext/informix/ifx.ec:1.32 php4/ext/informix/ifx.ec:1.33
--- php4/ext/informix/ifx.ec:1.32 Wed Feb 23 22:18:05 2000
+++ php4/ext/informix/ifx.ec Wed May 10 20:56:40 2000
@@ -2120,7 +2120,10 @@
ifx_var_flag(&lvar_tmp,1);
EXEC SQL GET DESCRIPTOR :descrpid VALUE :i :lvar_tmp = DATA;
- fieldleng=ifx_var_getlen(&lvar_tmp);
+ fieldleng=ifx_var_getlen(&lvar_tmp);
+
+ if (fieldleng > 2) fieldleng -= 2; /* fix by Alan Sheperd */
+
if ((char_data = (char *)emalloc(fieldleng + 1)) == NULL) {
php_error(E_WARNING, "Out of memory");
RETURN_FALSE;
@@ -2466,8 +2469,11 @@
case SQLLVARCHAR:
ifx_var_flag(&lvar_tmp,1);
EXEC SQL GET DESCRIPTOR :descrpid VALUE :i :lvar_tmp = DATA;
+
+ fieldleng=ifx_var_getlen(&lvar_tmp);
+
+ if (fieldleng > 2) fieldleng -= 2; /* fix by Alan Sheperd */
- fieldleng=ifx_var_getlen(&lvar_tmp);
if ((char_data = (char *)emalloc(fieldleng + 1)) == NULL) {
php_error(E_WARNING, "Out of memory");
RETURN_FALSE;