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.
This commit is contained in:
Daniel Kochmański 2025-07-23 15:54:40 +02:00
parent 407fe456fe
commit e98e36dfca

View file

@ -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;