fix: ConvertInteger was wrong for MIN(INTEGER)

This commit is contained in:
ceriel 1987-06-23 17:38:18 +00:00
parent 1ae2bd256e
commit 8e013368b3

View file

@ -49,10 +49,10 @@ IMPLEMENTATION MODULE Conversions;
len: CARDINAL;
VAR str: ARRAY OF CHAR);
BEGIN
IF num < 0 THEN
IF (num < 0) AND (num >= -MAX(INTEGER)) THEN
ConvertNum(-num, len, 10, TRUE, str);
ELSE
ConvertNum(num, len, 10, FALSE, str);
ConvertNum(CARDINAL(num), len, 10, FALSE, str);
END;
END ConvertInteger;