aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 99a06279f..3daa8fec9 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3861,7 +3861,7 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
/* The value of newLimit may be eventually cast to (size_t) and passed
** to mmap(). Restrict its value to 2GB if (size_t) is a 32-bit type. */
- if( sizeof(size_t)<8 ){
+ if( newLimit>0 && sizeof(size_t)<8 ){
newLimit = (newLimit & 0x7FFFFFFF);
}