From: fgsfds Date: Tue, 6 Feb 2018 20:12:22 +0000 (+0300) Subject: fixed small/short int sizes in e_msg X-Git-Url: https://deadsoftware.ru/gitweb?a=commitdiff_plain;h=af02bc9f8b2dea77c3bb3dbcc6d6992bd956dd89;p=d2df-sdl.git fixed small/short int sizes in e_msg --- diff --git a/src/engine/e_msg.pas b/src/engine/e_msg.pas index 1ed3809..6433511 100644 --- a/src/engine/e_msg.pas +++ b/src/engine/e_msg.pas @@ -164,12 +164,12 @@ end; procedure TMsg.Write(V: ShortInt); overload; begin - WriteData(@V, 2); + WriteData(@V, 1); end; procedure TMsg.Write(V: SmallInt); overload; begin - WriteData(@V, 1); + WriteData(@V, 2); end; procedure TMsg.Write(V: LongInt); overload; @@ -248,13 +248,13 @@ end; function TMsg.ReadShortInt(): ShortInt; begin Result := 0; - ReadData(@Result, 2); + ReadData(@Result, 1); end; function TMsg.ReadSmallInt(): SmallInt; begin Result := 0; - ReadData(@Result, 1); + ReadData(@Result, 2); end; function TMsg.ReadLongInt(): LongInt;