Commit aebe7354 authored by Timo Teräs's avatar Timo Teräs

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.
parent d3861d70
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment