From f712c75b663fe4899fd3bad9c09a0e440fd3ea97 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 20 May 2016 16:44:03 +0200 Subject: [PATCH] fix bug in previous commit in CMakeList --- coreapi/sqlite3_bctbx_vfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/coreapi/sqlite3_bctbx_vfs.c b/coreapi/sqlite3_bctbx_vfs.c index 79512172e..26c3b981f 100644 --- a/coreapi/sqlite3_bctbx_vfs.c +++ b/coreapi/sqlite3_bctbx_vfs.c @@ -71,11 +71,10 @@ static int sqlite3bctbx_Read(sqlite3_file *p, void *buf, int count, sqlite_int64 return SQLITE_OK; } else if( ret >= 0 ){ - + /*fill in unread portion of buffer, as requested by sqlite3 documentation*/ + memset(((uint8_t*)buf) + ret, 0, count-ret); return SQLITE_IOERR_SHORT_READ; - } - - else { + }else { return SQLITE_IOERR_READ; }