mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-08 08:41:21 +00:00
stop adding empty strings to readline's history
This commit is contained in:
parent
8634613509
commit
0f6c40c15e
1 changed files with 5 additions and 1 deletions
|
@ -1214,7 +1214,11 @@ fluid_istream_readline(fluid_istream_t in, fluid_ostream_t out, char *prompt,
|
|||
|
||||
FLUID_SNPRINTF(buf, len, "%s", line);
|
||||
buf[len - 1] = 0;
|
||||
add_history(buf);
|
||||
|
||||
if(buf[0] != '\0')
|
||||
{
|
||||
add_history(buf);
|
||||
}
|
||||
|
||||
free(line);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue