From: bakaq Date: Sun, 24 Sep 2023 18:07:39 +0000 (-0300) Subject: Fixed bug with '$skip_max_list'/4 X-Git-Tag: remove~86^2^2~3 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=2fe79b5fc3343b6245bf4dde1dec748bfe3ef997;p=scryer-prolog.git Fixed bug with '$skip_max_list'/4 --- diff --git a/src/lib/pio.pl b/src/lib/pio.pl index 8688e1c9..b6fe7786 100644 --- a/src/lib/pio.pl +++ b/src/lib/pio.pl @@ -170,14 +170,7 @@ partial_string_last_tail(PartialString, PartialStringTail) :- ). string_get_n_chars(String, Pos, N, Chars) :- - chars_to_read(CharsToRead), - ( CharsToRead < Pos -> - % I have absolutely no idea why this is needed (maybe it's a bug?), - % but hey, it works. - '$skip_max_list'(_, Pos, String, String0), - '$skip_max_list'(_, CharsToRead, String0, String1) - ; '$skip_max_list'(_, Pos, String, String1) - ), + '$skip_max_list'(_, Pos, String, String1), string_get_n_chars_(String1, N, Chars). string_get_n_chars_([], _, []).