From 9b3937cb03bc4651df977b387373ff9a15a2b2a4 Mon Sep 17 00:00:00 2001 From: AlexanderZemlyak Date: Tue, 13 Jan 2026 12:28:57 +0300 Subject: [PATCH] Fix range with step function in SPythonSystem --- bin/Lib/SPython/SPythonSystem.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/Lib/SPython/SPythonSystem.pas b/bin/Lib/SPython/SPythonSystem.pas index 6c0a15b2b..91e4bf471 100644 --- a/bin/Lib/SPython/SPythonSystem.pas +++ b/bin/Lib/SPython/SPythonSystem.pas @@ -634,7 +634,7 @@ function float(x: integer): real := PABCSystem.Floor(x); function range(s: integer; e: integer; step: integer): sequence of integer; begin - Result := PABCSystem.Range(s, e - 1, step); + Result := PABCSystem.Range(s, e - PABCSystem.Sign(step), step); end; function range(s: integer; e: integer): sequence of integer;