*len is a pointer to an integer, that is being decremented to reduce the overall length of the string to "remove" the NUL terminator. If you remove the operation you'll end up with 2 NULs at the end of the string.

Ilia Alshanetsky




On 19-May-09, at 12:58 PM, Matteo Beccati wrote:

Hi Ilia,

+                       if (*len) {
+ /* sqlite3.h says "the NUL terminator is included in the byte count for TEXT values" */ + *len--; /* do not remove this, even though it generates a warning */
+                       }

Would you mind explaining me why the fix was faulty?


Cheers

--
Matteo Beccati

OpenX - http://www.openx.org

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



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

Reply via email to