From 9f619adc01f1ae29dcd0c148b51cb78cce83d568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Wed, 14 Feb 2024 12:02:13 +0100 Subject: [PATCH] Fixed addition: final carry-over was inserted at the wrong end of the number --- UBigInt.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UBigInt.pas b/UBigInt.pas index f943fd2..6ee26d8 100644 --- a/UBigInt.pas +++ b/UBigInt.pas @@ -201,7 +201,7 @@ begin // Applies the carry-over into a new digit that was not anticipated in the initialization at the top (carry over // multiple digits). if carry > 0 then - Insert(1, Result.FDigits, 0); + Insert(1, Result.FDigits, len); Result.FIsNegative := AReturnNegative; end;