diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-03-24 08:36:49 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-03-24 08:36:49 +0000 |
commit | 34f2456e7dc42bf6e1dbf4aebd618e951b3b86c8 (patch) | |
tree | 711222efbe8be47c108e47bca40558839cce9d3d /misc/deco/files/patch-ag | |
parent | Upgrade to gputils 0.11.0. (diff) |
Eliminate endless loop when trying to view file of zero length.
Submitted by: ru
Diffstat (limited to '')
-rw-r--r-- | misc/deco/files/patch-ag | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/deco/files/patch-ag b/misc/deco/files/patch-ag new file mode 100644 index 000000000000..22dfb6ce5500 --- /dev/null +++ b/misc/deco/files/patch-ag @@ -0,0 +1,11 @@ +--- view.c Sat Jul 12 20:53:25 1997 ++++ view.c Sat Mar 22 18:24:31 2003 +@@ -47,7 +47,7 @@ + int sline, soff; /* search position */ + + baseline = basecol = 0; +- while (viewrec->lindex[baseline+1].seek < viewseek) ++ while (viewrec->lindex[baseline].len != -1 && viewrec->lindex[baseline+1].seek < viewseek) + ++baseline; + while (viewrec->lindex[baseline].seek + offset (baseline, basecol) + 40 < viewseek) + basecol += 40; |