small patches

This commit is contained in:
Vitor Santos Costa
2019-02-27 11:04:32 +00:00
parent 2d65d0463c
commit facf7ae8cd
6 changed files with 30 additions and 25 deletions

View File

@@ -783,6 +783,7 @@ static Int stream_property(USES_REGS1) { /* Init current_stream */
"current_stream/3");
if (i < 0) {
UNLOCK(GLOBAL_Stream[i].streamlock);
Yap_ThrowError(LOCAL_Error_TYPE, t1, "bad stream descriptor");
return false; // error...
}
EXTRA_CBACK_ARG(2, 1) = MkIntTerm(i);