fix: ConvertInteger was wrong for MIN(INTEGER)
This commit is contained in:
parent
1ae2bd256e
commit
8e013368b3
|
@ -49,10 +49,10 @@ IMPLEMENTATION MODULE Conversions;
|
||||||
len: CARDINAL;
|
len: CARDINAL;
|
||||||
VAR str: ARRAY OF CHAR);
|
VAR str: ARRAY OF CHAR);
|
||||||
BEGIN
|
BEGIN
|
||||||
IF num < 0 THEN
|
IF (num < 0) AND (num >= -MAX(INTEGER)) THEN
|
||||||
ConvertNum(-num, len, 10, TRUE, str);
|
ConvertNum(-num, len, 10, TRUE, str);
|
||||||
ELSE
|
ELSE
|
||||||
ConvertNum(num, len, 10, FALSE, str);
|
ConvertNum(CARDINAL(num), len, 10, FALSE, str);
|
||||||
END;
|
END;
|
||||||
END ConvertInteger;
|
END ConvertInteger;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue