iliaa Tue May 19 16:14:37 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo_sqlite sqlite_statement.c Log: MFB: Revert faulty warning fix http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.18.2.4.2.5&r2=1.18.2.4.2.6&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.5 php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.6 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.5 Wed Dec 31 11:17:42 2008 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Tue May 19 16:14:37 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_statement.c,v 1.18.2.4.2.5 2008/12/31 11:17:42 sebastian Exp $ */ +/* $Id: sqlite_statement.c,v 1.18.2.4.2.6 2009/05/19 16:14:37 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -244,6 +244,10 @@ default: *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; } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php