Skip to content

Commit a26b646

Browse files
committed
RecordSize fix
1 parent 8232f02 commit a26b646

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

origin/CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
15.09.2025
2+
- bugfixes (Parser.pas -> RecordSize)
3+
14
13.09.2025
25
- bugfixes and optimizations
36

origin/Parser.pas

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function RecordSize(IdentIndex: integer; field: string =''): integer;
211211
// if Ident[IdentIndex].NumAllocElements_ > 0 then
212212
// i := Ident[IdentIndex].NumAllocElements_
213213
// else
214-
i := Ident[IdentIndex].NumAllocElements;
214+
i := Ident[IdentIndex].NumAllocElements and $FFFF;
215215

216216
Result := 0;
217217

@@ -238,6 +238,12 @@ function RecordSize(IdentIndex: integer; field: string =''): integer;
238238

239239
if FieldType <> RECORDTOK then
240240
if (FieldType in Pointers) and (NumAllocElements > 0) then begin
241+
242+
if AllocElementType = RECORDTOK then begin
243+
AllocElementType := POINTERTOK;
244+
NumAllocElements := Types[i].Field[j].NumAllocElements shr 16;
245+
NumAllocElements_ := 0;
246+
end;
241247

242248
if NumAllocElements_ > 0 then
243249
inc(Result, NumAllocElements * NumAllocElements_ * DataSize[AllocElementType])

0 commit comments

Comments
 (0)