Fix NULL pointer reference.
This commit is contained in:
parent
b740fbac92
commit
ca38c8eafb
@ -136,6 +136,10 @@ askuser(dflt)
|
||||
|
||||
if (p = index(answer, '\n'))
|
||||
*p = '\0';
|
||||
|
||||
if (!answer[0] && !dflt)
|
||||
continue;
|
||||
|
||||
return (answer[0] ? answer : dflt);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user