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
parent
d3861d70a8
commit
aebe73549f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue