diff options
Diffstat (limited to 'src/pacman/log.c')
-rw-r--r-- | src/pacman/log.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pacman/log.c b/src/pacman/log.c index 4685bd85..f139fb14 100644 --- a/src/pacman/log.c +++ b/src/pacman/log.c @@ -192,12 +192,14 @@ int yesno(char *fmt, ...) pch--; } *++pch = 0; - strtrim(response); + if(strlen(response) != 0) { + strtrim(response); + } /* User hits 'enter', forcing a newline here */ neednl = 0; - if(!strcasecmp(response, _("Y")) || !strcasecmp(response, _("YES")) || !strlen(response)) { + if(!strcasecmp(response, _("Y")) || !strcasecmp(response, _("YES")) || strlen(response) == 0) { return(1); } } |