index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-08-09 02:34:11 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-09 15:41:18 -0500 |
commit | 96c4b1c3033e4f018ab20af5d35cf9cbd8b31cf4 (patch) | |
tree | fe691683c6baf65e4fa26a64796157d104ace112 /lib/libalpm/util.c | |
parent | a42e52a09f8ccf25a46d7953b2e0a30f306ed223 (diff) |
-rw-r--r-- | lib/libalpm/util.c | 2 |
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index bd0526ce..adb1d192 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -219,7 +219,7 @@ size_t _alpm_strip_newline(char *str) return 0; } len = strlen(str); - while(str[len - 1] == '\n') { + while(len > 0 && str[len - 1] == '\n') { len--; } str[len] = '\0'; |