Index: src/shell.c ================================================================== --- src/shell.c +++ src/shell.c @@ -1849,11 +1849,11 @@ rc = 1; } }else #endif - if( c=='l' && strncmp(azArg[0], "log", n)==0 && nArg>=1 ){ + if( c=='l' && strncmp(azArg[0], "log", n)==0 && nArg>=2 ){ const char *zFile = azArg[1]; if( p->pLog && p->pLog!=stdout && p->pLog!=stderr ){ fclose(p->pLog); p->pLog = 0; }