]> Repositorios git - scryer-prolog.git/commitdiff
fix at_end_of_stream/1 (#479)
authorMark Thom <[email protected]>
Sun, 10 May 2020 22:06:15 +0000 (16:06 -0600)
committerMark Thom <[email protected]>
Sun, 10 May 2020 22:06:15 +0000 (16:06 -0600)
src/prolog/lib/builtins.pl

index 0cf39457300b94ea510a9ae327dce5e041eb4cbf..76060ca5c5b837a8d24e4e2dd760feef410f787a 100644 (file)
@@ -1307,12 +1307,11 @@ stream_property(S, P) :-
 
 at_end_of_stream(S_or_a) :-
     (  atom(S_or_a) ->
-       stream_property(S, alias(A))
+       stream_property(S, alias(S_or_a))
     ;  S = S_or_a
     ),
     stream_property(S, end_of_stream(E)),
-    !,
-    ( E = at ; E = past ).
+    ( E = at -> true ; E = past ).
 
 at_end_of_stream :-
     current_input(S),