1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

In the shell, make sure the ".log" command has at least one argument.

FossilOrigin-Name: 1ed5e361ca7bfa9226fec265704394e0f228f0c5
This commit is contained in:
drh
2011-03-23 11:16:22 +00:00
parent fb1f98a1ac
commit c8ba212665
3 changed files with 19 additions and 9 deletions

View File

@@ -1851,7 +1851,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
}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);