mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-22 19:01:12 +00:00
Fixed bytes being written incorrectly
This commit is contained in:
parent
83aa9388ca
commit
5895b88799
4 changed files with 8 additions and 8 deletions
|
@ -259,7 +259,7 @@ static struct TicSpecial
|
|||
streamoffs = 0;
|
||||
}
|
||||
|
||||
TicSpecial &operator << (int8_t it)
|
||||
TicSpecial &operator << (uint8_t it)
|
||||
{
|
||||
if (streamptr)
|
||||
{
|
||||
|
@ -2067,7 +2067,7 @@ void Net_NewMakeTic (void)
|
|||
specials.NewMakeTic ();
|
||||
}
|
||||
|
||||
void Net_WriteInt8 (int8_t it)
|
||||
void Net_WriteInt8 (uint8_t it)
|
||||
{
|
||||
specials << it;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ void Net_CheckLastReceived(int);
|
|||
|
||||
// [RH] Functions for making and using special "ticcmds"
|
||||
void Net_NewMakeTic ();
|
||||
void Net_WriteInt8 (int8_t);
|
||||
void Net_WriteInt8 (uint8_t);
|
||||
void Net_WriteInt16 (int16_t);
|
||||
void Net_WriteInt32 (int32_t);
|
||||
void Net_WriteInt64(int64_t);
|
||||
|
|
|
@ -55,9 +55,9 @@ const char *ReadStringConst(uint8_t **stream)
|
|||
return string;
|
||||
}
|
||||
|
||||
int8_t ReadInt8 (uint8_t **stream)
|
||||
uint8_t ReadInt8 (uint8_t **stream)
|
||||
{
|
||||
int8_t v = **stream;
|
||||
uint8_t v = **stream;
|
||||
*stream += 1;
|
||||
return v;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ void WriteString (const char *string, uint8_t **stream)
|
|||
}
|
||||
|
||||
|
||||
void WriteInt8 (int8_t v, uint8_t **stream)
|
||||
void WriteInt8 (uint8_t v, uint8_t **stream)
|
||||
{
|
||||
**stream = v;
|
||||
*stream += 1;
|
||||
|
|
|
@ -247,7 +247,7 @@ int SkipTicCmd (uint8_t **stream, int count);
|
|||
void ReadTicCmd (uint8_t **stream, int player, int tic);
|
||||
void RunNetSpecs (int player, int buf);
|
||||
|
||||
int8_t ReadInt8 (uint8_t **stream);
|
||||
uint8_t ReadInt8 (uint8_t **stream);
|
||||
int16_t ReadInt16 (uint8_t **stream);
|
||||
int32_t ReadInt32 (uint8_t **stream);
|
||||
int64_t ReadInt64(uint8_t** stream);
|
||||
|
@ -255,7 +255,7 @@ float ReadFloat (uint8_t **stream);
|
|||
double ReadDouble(uint8_t** stream);
|
||||
char *ReadString (uint8_t **stream);
|
||||
const char *ReadStringConst(uint8_t **stream);
|
||||
void WriteInt8 (int8_t val, uint8_t **stream);
|
||||
void WriteInt8 (uint8_t val, uint8_t **stream);
|
||||
void WriteInt16 (int16_t val, uint8_t **stream);
|
||||
void WriteInt32 (int32_t val, uint8_t **stream);
|
||||
void WriteInt64(int64_t val, uint8_t** stream);
|
||||
|
|
Loading…
Reference in a new issue