Closed mitzix closed 2 years ago
When you have record as
TTest = record [Serialize(01)] Array: TArray<anytype>; end;
If Array item is nil (empty) then code in Grijjy.ProtocolBuffers at line 1090 crashes due to Range Check Error because RecBytes has no [0] item.
Correct implementation should be
... if (Len > 0) then begin AReader.ReadBytes(RecBytes[0], Len); RecReader := TReader.Create(@RecBytes[0], Len); try Info.Deserialize(RecReader, P); finally RecReader.Free; end; end;
Good catch! Implemented the fix. Thanks!
When you have record as
If Array item is nil (empty) then code in Grijjy.ProtocolBuffers at line 1090 crashes due to Range Check Error because RecBytes has no [0] item.
Correct implementation should be