mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 2fc528e8ec81a7094229c3eec02a63d30a19e1a1
parent cfb490561a9edefcd549234b93abaef6d37e353d
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Sun, 31 Jul 2016 16:53:02 +0200

seq: don't crash when cur link doesn't exist

Diffstat:
seq.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/seq.c b/seq.c @@ -265,7 +265,8 @@ blaze822_seq_next(char *map, char *range, struct blaze822_seq_iter *iter) iter->lines = 1; find_cur(map, iter); iter->start = iter->stop = iter->line = iter->cur + 1; - return strdup(blaze822_seq_cur()); + char *cur = blaze822_seq_cur(); + return cur ? strdup(cur) : 0; } else { return 0; }