DEADSOFTWARE

fixed small/short int sizes in e_msg
authorfgsfds <pvt.fgsfds@gmail.com>
Tue, 6 Feb 2018 20:12:22 +0000 (23:12 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Tue, 6 Feb 2018 20:12:22 +0000 (23:12 +0300)
src/engine/e_msg.pas

index 1ed3809b3f313c857b086a2e906a00c512875f83..6433511f3abd87e2d2570a4e05b272f3e1ecb7a8 100644 (file)
@@ -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;