helly           Tue Feb 28 18:00:03 2006 UTC

  Modified files:              
    /php-src/main/streams       streams.c 
  Log:
  - If (SEEK_CUR,0) means an illegal seek we return -1 to denote the error
  
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/streams.c?r1=1.97&r2=1.98&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.97 php-src/main/streams/streams.c:1.98
--- php-src/main/streams/streams.c:1.97 Tue Feb 28 12:06:54 2006
+++ php-src/main/streams/streams.c      Tue Feb 28 18:00:03 2006
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.97 2006/02/28 12:06:54 helly Exp $ */
+/* $Id: streams.c,v 1.98 2006/02/28 18:00:03 helly Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1638,7 +1638,7 @@
                        case SEEK_CUR:
                                if (offset == 0) {
                                        /* nothing to do */
-                                       return 0;
+                                       return stream->position >= 0 ? 0 : -1;
                                }
 
                                if (offset > 0 && offset <= 
stream->readbuf_avail) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to