Skip to content

Commit

Permalink
fixed TOrmPropInfoList name search
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Oct 22, 2021
1 parent 257e556 commit 61c6cf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/orm/mormot.orm.base.pas
Expand Up @@ -7124,7 +7124,7 @@ function TOrmPropInfoList.IndexByName(aName: PUtf8Char): PtrInt;
table: PByteArray;
{$endif CPUX86NOTPIC}
label
end1;
end1, no;
begin
if (self <> nil) and
(aName <> nil) and
Expand Down Expand Up @@ -7153,7 +7153,7 @@ function TOrmPropInfoList.IndexByName(aName: PUtf8Char): PtrInt;
if C1 = 0 then
goto end1;
until C1 <> C2;
cmp := result + 1; // compile as 2 branchless cmovc/cmovnc on FPC
no: cmp := result + 1; // compile as 2 branchless cmovc/cmovnc on FPC
dec(result);
if C1 > C2 then
L := cmp
Expand All @@ -7163,7 +7163,7 @@ function TOrmPropInfoList.IndexByName(aName: PUtf8Char): PtrInt;
break;
continue;
end1: if C2 <> 0 then
break;
goto no;
result := fOrderedByName[result]; // reached ending #0 on both names
exit;
until false;
Expand Down

0 comments on commit 61c6cf8

Please sign in to comment.