diff --git a/tests/webtbs/tw12038.pp b/tests/webtbs/tw12038.pp index efc0319267..6ed41a7e33 100644 --- a/tests/webtbs/tw12038.pp +++ b/tests/webtbs/tw12038.pp @@ -209,7 +209,7 @@ var ProcessThisProperty : boolean; Fu_ResultType: String; Flags: TParamFlags; - Flag:byte; + Flag:word; Definition: String; begin // Finding property type @@ -275,7 +275,7 @@ begin for i:= 1 to DTypeData^.ParamCount do begin { First Handle the ParamFlag } - Flag:=byte(DTypeData^.ParamList[CurrentParamPosition]); + Flag:=pword(@DTypeData^.ParamList[CurrentParamPosition])^; Flags:=TParamFlags(Flag); writeln('ord(Flags):',ord(DTypeData^.ParamList[CurrentParamPosition])); // For i:= 1 to NumI do @@ -294,7 +294,7 @@ begin then Definition := Definition+('out '); { Next char is the length of the ParamName} - inc(CurrentParamPosition); + inc(CurrentParamPosition,SizeOf(TParamFlags)); ParamNameLength := ord( DTypeData^.ParamList[CurrentParamPosition]); { Next extract the Name of the Parameter } ParamName := ''; diff --git a/tests/webtbs/tw2886.pp b/tests/webtbs/tw2886.pp index 0e77c30833..a945f8872b 100644 --- a/tests/webtbs/tw2886.pp +++ b/tests/webtbs/tw2886.pp @@ -40,7 +40,9 @@ begin // for i:=0 to ParamCount-1 do begin // SizeOf(TParamFlags) is 4, but the data is only 1 byte - Len:=1; // typinfo.pp comment is wrong: SizeOf(TParamFlags) + //Len:=1; // typinfo.pp comment is wrong: SizeOf(TParamFlags) + // Note by SB (2017-01-08): No longer true since typinfo uses packed sets + Len:=SizeOf(TParamFlags); inc(Offset,Len); // read ParamName