Limit iteration in Cyc_io_peek_char

This commit is contained in:
Justin Ethier 2017-11-12 18:45:04 -05:00
parent 9cfb80677a
commit 1e8819d57e

View file

@ -6375,7 +6375,7 @@ object Cyc_io_peek_char(void *data, object cont, object port)
buf[0] = c; buf[0] = c;
i = 1; i = 1;
while (1) { // TODO: limit to 4 chars?? while (i < 5) { // TODO: limit to 4 chars??
if (p->mem_buf_len == p->buf_idx + i) { if (p->mem_buf_len == p->buf_idx + i) {
// No more buffered chars // No more buffered chars
at_mem_buf_end = 1; at_mem_buf_end = 1;