fix bad overflow handling in peek_memory_stream (obs from Jos De Roo).

This commit is contained in:
Vitor Santos Costa 2010-02-28 09:30:58 +00:00
parent 12b8acfa20
commit c8479541bb

View File

@ -3401,7 +3401,7 @@ p_peek_mem_write_stream (void)
Yap_Error(OUT_OF_STACK_ERROR, TermNil, Yap_ErrorMessage);
return(FALSE);
}
i = 0;
i = Stream[sno].u.mem_string.pos;
tf = ARG2;
LOCK(Stream[sno].streamlock);
goto restart;