+ check for duplicated data sections

This commit is contained in:
Nikolay Nikolov 2023-12-26 16:39:29 +02:00
parent 6f7c1b5b4e
commit 10b201c506

View File

@ -2220,6 +2220,7 @@ implementation
ImportSectionRead: Boolean = false;
FunctionSectionRead: Boolean = false;
CodeSectionRead: Boolean = false;
DataSectionRead: Boolean = false;
DataCountSectionRead: Boolean = false;
DataSegments: array of record
@ -2732,6 +2733,12 @@ implementation
function ReadDataSection: Boolean;
begin
Result:=False;
if DataSectionRead then
begin
InputError('Data section is duplicated');
exit;
end;
DataSectionRead:=True;
end;
function ReadDataCountSection: Boolean;