ref: dc293899bec83c2b49ab2d6035097fae5e097009
parent: 6b38e52e4b38370d3097a32550ba9cace6782888
author: Michael Forney <mforney@mforney.org>
date: Wed Sep 28 17:45:49 EDT 2022
patch: fix line calculation to avoid redundant searches
--- a/sys/src/cmd/patch.c
+++ b/sys/src/cmd/patch.c
@@ -527,7 +527,7 @@
return f->buf + off;
}
}
- ln = h->oldln + fuzz - 1;
+ ln = h->oldln + fuzz + 1;
if(ln <= f->nlines){
off = f->lines[ln];
if(off + len >= f->len)