Selaa lähdekoodia

Properly handle empty filters

master
sin 9 vuotta sitten
vanhempi
commit
30ca80310a
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. +2
    -1
      noice.c

+ 2
- 1
noice.c Näytä tiedosto

@@ -331,10 +331,11 @@ readln(void)

echo();
curs_set(TRUE);
memset(ln, 0, sizeof(ln));
getnstr(ln, sizeof(ln) - 1);
noecho();
curs_set(FALSE);
return strdup(ln);
return strlen(ln) ? strdup(ln) : NULL;
}

/*


Loading…
Peruuta
Tallenna