commit 3387ec827ea9fb9e5704e084c10103af1623ec7d from: Mark Jamsek via: Thomas Adam date: Tue Aug 30 15:03:45 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 - 116aeeba339b75018a67f40beac06b5aa375eff2 commit + 3387ec827ea9fb9e5704e084c10103af1623ec7d blob - 0a212239b670c6ca16ed4334951fffdc07ca2c70 blob + 1174cfde7a73bb0a1bb62e32a59759f03e7c66eb --- lib/diff.c +++ lib/diff.c @@ -73,7 +73,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);