diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 0b35dcf88..e45a013f8 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -10444,7 +10444,7 @@ begin raise new ArgumentException(GetTranslation(PARAMETER_FROM_OUT_OF_RANGE)); if (situation = 0) or (situation = 1) then - if (&to < 0) or (&to > Len) then + if (&to < -1) or (&to > Len) then raise new ArgumentException(GetTranslation(PARAMETER_TO_OUT_OF_RANGE)); if situation > 0 then