sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit f5baf2630ab0cf51306bb94311e7eed84caa730d
parent 28129a87c4db31cd43f0e4289e68587f2a01127e
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Sun Jul 24 21:04:27 -0400

ed: Don't match against line 0 in search()

regexec(3) happily matches /^$/ against the text of line
zero (the null string), causing an error.

Also update email address for Wolfgang Corcoran-Mathe

Diffstat:
LICENSE | 2+-
ed.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/LICENSE b/LICENSE @@ -58,6 +58,6 @@ Authors/contributors include: © 2015 Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com> © 2015 Quentin Rameau <quinq@quinq.eu.org> © 2015 Dionysis Grigoropoulos <info@erethon.com> -© 2015 Wolfgang Corcoran-Mathe <first.lord.of.teal@gmail.com> +© 2015 Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz> © 2016 Mattias Andrée <maandree@kth.se> © 2016 Eivind Uggedal <eivind@uggedal.com> diff --git a/ed.c b/ed.c @@ -426,7 +426,7 @@ search(int way) i = curln; do { i = (way == '?') ? prevln(i) : nextln(i); - if (match(i)) + if (i > 0 && match(i)) return i; } while (i != curln);