From e98e36dfca28404a6f5c8dd71de3b3d27bfb0f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Wed, 23 Jul 2025 15:54:40 +0200 Subject: [PATCH] streams: fix a braino in str_in_unread_char We've tested a wrong variable so this function allowed us to plum into negative indexes. --- src/c/streams/strm_string.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c/streams/strm_string.d b/src/c/streams/strm_string.d index 2543d492e..cfd97450a 100644 --- a/src/c/streams/strm_string.d +++ b/src/c/streams/strm_string.d @@ -219,7 +219,7 @@ static void str_in_unread_char(cl_object strm, ecl_character c) { cl_fixnum curr_pos = STRING_INPUT_POSITION(strm); - unlikely_if (c <= 0) { + unlikely_if (curr_pos <= 0) { ecl_unread_error(strm); } STRING_INPUT_POSITION(strm) = curr_pos - 1;