From f333fb08ec41d4886a8dc9a35479bcdcc08f3b78 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Feb 2021 18:04:12 +0000 Subject: [PATCH] * patch by Alfred to fix cutils.CompareVersionStrings, resolves #38514 git-svn-id: trunk@48757 - --- compiler/cutils.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/cutils.pas b/compiler/cutils.pas index d8f3f4eda0..d75b3cd486 100644 --- a/compiler/cutils.pas +++ b/compiler/cutils.pas @@ -1298,9 +1298,10 @@ implementation { if one of the two is at the end while the other isn't, add a '.0' } if (i1>length(s1)) and (i2<=length(s2)) then - s1:=s1+'.0' - else if i2>length(s2) then - s2:=s2+'.0'; + s1:=s1+'.0'; + if (i2>length(s2)) and + (i1<=length(s1)) then + s2:=s2+'.0'; { compare non-numerical characters normally } while (i1<=length(s1)) and not(s1[i1] in ['0'..'9']) and