commit 2d61e38170df9e7e558024fa6f3c05196148f15a from: Mark Jamsek date: Tue Aug 30 12:11:20 2022 UTC tog: fix typo in diff nlines > 0 check We want to check if *nlines is greater than zero here. ok op@ and stsp@ commit - e4556f5ad27817d84c98b820f3e952b57c4e926c commit + 2d61e38170df9e7e558024fa6f3c05196148f15a blob - 530b713f15da935fc9e60332b0cbd976118130ed blob + ec271a03249db4f54f213d8fd71a18c6220153ef --- lib/diff.c +++ lib/diff.c @@ -72,7 +72,7 @@ diff_blobs(struct got_diff_line **lines, size_t *nline off_t outoff = 0; int n; - if (lines && *lines && nlines > 0) + if (lines && *lines && *nlines > 0) outoff = (*lines)[*nlines - 1].offset; else if (lines) { err = add_line_metadata(lines, nlines, 0, GOT_DIFF_LINE_NONE);