diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-05-19 16:14:13 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-05-19 16:14:13 +0000 |
commit | 70fb8c85f1f69264a0c56d6677be3f6bca7303ba (patch) | |
tree | 6bd84a327c738745e9602723796fcd8a8953833d /ext/pdo_sqlite | |
parent | 9e230424b568dde3531273ae4b3e06273c03c66f (diff) | |
download | php-git-70fb8c85f1f69264a0c56d6677be3f6bca7303ba.tar.gz |
Revert faulty warning fix
Diffstat (limited to 'ext/pdo_sqlite')
-rw-r--r-- | ext/pdo_sqlite/sqlite_statement.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index ea94eb29b2..82e4cb8f6c 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -265,6 +265,10 @@ static int pdo_sqlite_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsi 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: |