]> granicus.if.org Git - php/commitdiff
fix savelob() to make it possible to write data at the beginning of LOB
authorAntony Dovgal <tony2001@php.net>
Tue, 20 Jan 2004 11:37:17 +0000 (11:37 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 20 Jan 2004 11:37:17 +0000 (11:37 +0000)
ext/oci8/oci8.c

index afe5b74f414631ffd45fdb41c7cce92c7cb0aa68..884f7adf49276eb7836f3f58714160d1cb34deaa 100644 (file)
@@ -3118,8 +3118,8 @@ PHP_FUNCTION(ocisavelob)
 
                        if (offparam == -1) {
                                offset = curloblen;
-                       } else if ((ub4) offparam >= curloblen) {
-                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset smaller than current LOB-Size - appending");
+                       } else if (offparam >= curloblen) {
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is bigger than current LOB-Size - appending");
                                offset = curloblen;
                        } else {
                                offset = offparam;
@@ -3128,7 +3128,6 @@ PHP_FUNCTION(ocisavelob)
                        WRONG_PARAM_COUNT;
                }
 
-               offset++;
                convert_to_string_ex(arg);
                loblen = Z_STRLEN_PP(arg);