1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Parse '0' as a valid package installed size

This was a bad oversight on my part, pointed out by Jakob. Whoops.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-10-04 15:31:17 -05:00
parent 94bc64ae1b
commit cf0edb92ba

View File

@ -1089,7 +1089,7 @@ off_t _alpm_strtoofft(const char *line)
errno = 0;
/* we are trying to parse bare numbers only, no leading anything */
if(line[0] < '1' || line[0] > '9') {
if(line[0] < '0' || line[0] > '9') {
return (off_t)-1;
}
result = strtoull(line, &end, 10);