diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
| commit | 2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch) | |
| tree | 41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/sqlite/libsqlite/src/encode.c | |
| parent | d29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff) | |
| download | php-2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b.tar.gz | |
Imported Upstream version 5.2.2upstream/5.2.2
Diffstat (limited to 'ext/sqlite/libsqlite/src/encode.c')
| -rw-r--r-- | ext/sqlite/libsqlite/src/encode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/sqlite/libsqlite/src/encode.c b/ext/sqlite/libsqlite/src/encode.c index 86e33a750..956d7d128 100644 --- a/ext/sqlite/libsqlite/src/encode.c +++ b/ext/sqlite/libsqlite/src/encode.c @@ -15,7 +15,7 @@ ** data in an SQLite database. The code in this file is not used by any other ** part of the SQLite library. ** -** $Id: encode.c,v 1.5.4.1 2005/09/07 15:11:32 iliaa Exp $ +** $Id: encode.c,v 1.5.4.1.2.1 2006/12/24 20:50:02 iliaa Exp $ */ #include <string.h> #include <assert.h> @@ -176,9 +176,12 @@ int sqlite_decode_binary(const unsigned char *in, unsigned char *out){ int i, e; unsigned char c; e = *(in++); + if (e == 0) { + return 0; + } i = 0; while( (c = *(in++))!=0 ){ - if( c==1 ){ + if (c == 1) { c = *(in++) - 1; } out[i++] = c + e; |
