pkg: fix parsing of empty dependencies

if the dependencies are empty with only trailing new line, the
parsing was incorrect. fix the new line check.
cute-signatures
Timo Teras 2009-09-16 20:23:34 +03:00
parent d3861d70a8
commit aebe73549f
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ void apk_deps_parse(struct apk_database *db,
{
struct parse_depend_ctx ctx = { db, depends };
if (blob.len > 1 && blob.ptr[blob.len-1] == '\n')
if (blob.len > 0 && blob.ptr[blob.len-1] == '\n')
blob.len--;
apk_blob_for_each_segment(blob, " ", parse_depend, &ctx);