From 778e6a4bf0c9d3d497e6315ac42f5938afb2e771 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 24 Mar 2016 06:42:00 -0700 Subject: Bugfix: lazy str printing not observing limit. * lib.c (lazy_str_put, out_lazy_str): Decrement lim variable in loop body. --- lib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib.c') diff --git a/lib.c b/lib.c index dca1b9de..32d5b5e7 100644 --- a/lib.c +++ b/lib.c @@ -6339,6 +6339,8 @@ val lazy_str_put(val lstr, val stream) val str = car(iter); if (!str) break; + if (lim) + lim = pred(lim); put_string(str, stream); put_string(term, stream); } @@ -8401,6 +8403,8 @@ static void out_lazy_str(val lstr, val out) break; out_str_pretty(c_str(str), out, &semi_flag); out_str_pretty(wcterm, out, &semi_flag); + if (lim) + lim = pred(lim); } put_char(chr('"'), out); -- cgit v1.2.3