aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-12-31 13:25:56 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-12-31 13:25:56 +0100
commitb93b9303da2bc819d74b01b937300ee29f6323ff (patch)
tree3e50c9b4500f2e3c6a9fa3125cad9a907f012b6c
parent6464ba584539365219f84326012fee87f71bde54 (diff)
downloadmblaze-b93b9303da2bc819d74b01b937300ee29f6323ff.tar.gz
seq: avoid infinite loop in "mscan -n ."
-rw-r--r--seq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/seq.c b/seq.c
index 7b0b9ea..4fd6c28 100644
--- a/seq.c
+++ b/seq.c
@@ -397,7 +397,7 @@ char *
blaze822_seq_next(char *map, char *range, struct blaze822_seq_iter *iter)
{
if (strcmp(range, ".") == 0) {
- if (!iter->lines) {
+ if (!iter->lines && !iter->start) {
iter->lines = 1;
find_cur(map, iter);
iter->start = iter->stop = iter->line = iter->cur + 1;