diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-24 06:42:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-24 06:42:00 -0700 |
commit | 778e6a4bf0c9d3d497e6315ac42f5938afb2e771 (patch) | |
tree | 2d2a9031692c625eb2a1b8662c312e757b513591 | |
parent | ce163957bcd1da030deb08774878d4aef60fe816 (diff) | |
download | txr-778e6a4bf0c9d3d497e6315ac42f5938afb2e771.tar.gz txr-778e6a4bf0c9d3d497e6315ac42f5938afb2e771.tar.bz2 txr-778e6a4bf0c9d3d497e6315ac42f5938afb2e771.zip |
Bugfix: lazy str printing not observing limit.
* lib.c (lazy_str_put, out_lazy_str): Decrement lim
variable in loop body.
-rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |