cvs: php-src(PHP_5_3) /ext/pdo_sqlite sqlite_statement.c
| From: | Ilia Alshanetsky | Date: | Tue, 19 May 2009 16:14:13 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/pdo_sqlite sqlite_statement.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-58012@lists.php.net to get a copy of this message | ||
iliaa Tue May 19 16:14:13 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/pdo_sqlite sqlite_statement.c
Log:
Revert faulty warning fix
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.18.2.4.2.3.2.7&r2=1.18.2.4.2.3.2.8&diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite_statement.c
diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.7
php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.8
--- php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.7 Thu May 7 23:29:54 2009
+++ php-src/ext/pdo_sqlite/sqlite_statement.c Tue May 19 16:14:13 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.7 2009/05/07 23:29:54 mbeccati Exp $ */
+/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.8 2009/05/19 16:14:13 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -265,6 +265,10 @@
case SQLITE3_TEXT:
*ptr = (char*)sqlite3_column_text(S->stmt, colno);
*len = sqlite3_column_bytes(S->stmt, colno);
+ 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 */
+ }
return 1;
default: