commit 9c659ea03e148f73684817fbc7104feb365ee820 from: Stefan Sperling date: Sun Nov 22 13:25:32 2020 UTC do not forget to add an offset for line zero in diff_blobs() Fixes a problem in 'tog diff' where the first line of the output was cut off. commit - 22c0f09da0674b6b6122c7de371a1e35ade2e351 commit + 9c659ea03e148f73684817fbc7104feb365ee820 blob - 28c604682a56fc5aabb094bd91193ddebda81043 blob + ab9338f610ccb3d2aac14b126d7201e501f48cb3 --- lib/diff.c +++ lib/diff.c @@ -71,6 +71,11 @@ diff_blobs(off_t **line_offsets, size_t *nlines, if (line_offsets && *line_offsets && *nlines > 0) outoff = (*line_offsets)[*nlines - 1]; + else if (line_offsets) { + err = add_line_offset(line_offsets, nlines, 0); + if (err) + goto done; + } if (resultp) *resultp = NULL;