cvs: php3 /functions/
| From: | Danny Heijl | Date: | Wed, 10 May 2000 18:58:22 +0000 |
| Subject: | cvs: php3 /functions/ | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18580@lists.php.net to get a copy of this message | ||
danny Wed May 10 20:58:22 2000 EDT
Modified files:
/php3/functions ifx.ec
Log:
- fix for SQLLVARCHAR provided by Alex.Shepher@cse.co.nz (Danny)
Index: php3/functions/ifx.ec
diff -u php3/functions/ifx.ec:1.48 php3/functions/ifx.ec:1.49
--- php3/functions/ifx.ec:1.48 Mon Feb 21 08:57:00 2000
+++ php3/functions/ifx.ec Wed May 10 20:58:22 2000
@@ -30,7 +30,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ifx.ec,v 1.48 2000/02/21 07:57:00 eschmid Exp $ */
+/* $Id: ifx.ec,v 1.49 2000/05/10 18:58:22 danny Exp $ */
/* -------------------------------------------------------------------
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -2207,7 +2207,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) {
php3_error(E_WARNING, "Out of memory");
RETURN_FALSE;
@@ -2561,8 +2564,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) {
php3_error(E_WARNING, "Out of memory");
RETURN_FALSE;