Re: cvs: php4 /ext/dio dio.c

From: Date: Sat, 06 Jul 2002 11:35:51 +0000
Subject: Re: cvs: php4 /ext/dio dio.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12729@lists.php.net to get a copy of this message
Are you sure the length should be strlen("string") and not strlen("string")+1? In any case, this kind of code should use sizeof("type") and not numbers which is extremely prone to error. Sterling, how did you write such ugly code :P Shame on you! ;) Andi At 07:34 PM 7/5/2002 +0000, Jani Taskinen wrote:
sniper          Fri Jul  5 15:34:43 2002 EDT
Modified files:
    /php4/ext/dio       dio.c
Log: Fix bug: #16707 Index: php4/ext/dio/dio.c diff -u php4/ext/dio/dio.c:1.12 php4/ext/dio/dio.c:1.13
--- php4/ext/dio/dio.c:1.12     Sun Jun  9 08:56:27 2002
+++ php4/ext/dio/dio.c Fri Jul 5 15:34:42 2002 @@ -346,10 +346,10 @@
                                lk.l_whence = 0;
                        }
                        else {
-                               lk.l_whence = SEEK_SET;
+                               lk.l_whence = Z_LVAL_PP(element);
                        }
-                       if (zend_hash_find(fh, "type", 6, (void **) &element) == FAILURE) {
+                       if (zend_hash_find(fh, "type", 4, (void **) &element) == FAILURE) {
                                lk.l_type = 0;
                        }
                        else {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.cvs (#12729) next »