diff options
author | 2015-03-16 00:06:33 +0000 | |
---|---|---|
committer | 2015-03-16 00:06:33 +0000 | |
commit | 476ed7b902c71c189883939f8fb66a03e3eb82d9 (patch) | |
tree | ac10f46a6d4287dd3790a3815808837f9318d24b /lib/libsqlite3/tool/showwal.c | |
parent | from zhuk: two grammar fixes; (diff) | |
download | wireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.tar.xz wireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.zip |
Update sqlite3 to 3.8.7.4. Changes available here: http://sqlite.org/changes.html#version_3_8_7_4
ok landry@
Diffstat (limited to 'lib/libsqlite3/tool/showwal.c')
-rw-r--r-- | lib/libsqlite3/tool/showwal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libsqlite3/tool/showwal.c b/lib/libsqlite3/tool/showwal.c index 6dc1de173f3..35810c66a96 100644 --- a/lib/libsqlite3/tool/showwal.c +++ b/lib/libsqlite3/tool/showwal.c @@ -510,7 +510,7 @@ static void decode_btree_page( int main(int argc, char **argv){ struct stat sbuf; - unsigned char zPgSz[2]; + unsigned char zPgSz[4]; if( argc<2 ){ fprintf(stderr,"Usage: %s FILENAME ?PAGE? ...\n", argv[0]); exit(1); @@ -522,9 +522,9 @@ int main(int argc, char **argv){ } zPgSz[0] = 0; zPgSz[1] = 0; - lseek(fd, 10, SEEK_SET); - read(fd, zPgSz, 2); - pagesize = zPgSz[0]*256 + zPgSz[1]; + lseek(fd, 8, SEEK_SET); + read(fd, zPgSz, 4); + pagesize = zPgSz[1]*65536 + zPgSz[2]*256 + zPgSz[3]; if( pagesize==0 ) pagesize = 1024; printf("Pagesize: %d\n", pagesize); fstat(fd, &sbuf); |