Ignore:
Timestamp:
May 18, 2022, 11:12:29 AM (2 years ago)
Author:
chronos
Message:
  • Fixed: Data size was not correctly stored in server commands. Introduced in rev 435.
  • Fixed: Check data size for its maximum. Limit maximum length of unit and city name so it can fit into data block.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Tribes.pas

    r417 r438  
    2020    yShield: Integer;
    2121  end;
     22
     23  { TModelPictureInfo }
    2224
    2325  TModelPictureInfo = record
     
    2729    Hash: Integer;
    2830    GrName: ShortString;
     31    function GetCommandDataSize: Byte;
    2932  end;
    3033
     
    283286end;
    284287
     288{ TModelPictureInfo }
     289
     290function TModelPictureInfo.GetCommandDataSize: Byte;
     291begin
     292  Result := SizeOf(trix) + SizeOf(mix) + SizeOf(pix) + SizeOf(Hash) + 1 +
     293    Length(GrName);
     294end;
     295
    285296constructor TTribe.Create(FileName: string);
    286297var
Note: See TracChangeset for help on using the changeset viewer.