Skip to content

Commit

Permalink
Fixes possible crash when using hud_change with "align" or "offset"
Browse files Browse the repository at this point in the history
  • Loading branch information
kaeza authored and kwolekr committed Apr 24, 2013
1 parent a699bdb commit 33dd267
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.cpp
Expand Up @@ -2097,7 +2097,8 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
u32 id = readU32(is); u32 id = readU32(is);
u8 stat = (HudElementStat)readU8(is); u8 stat = (HudElementStat)readU8(is);


if (stat == HUD_STAT_POS || stat == HUD_STAT_SCALE) if (stat == HUD_STAT_POS || stat == HUD_STAT_SCALE
|| stat == HUD_STAT_ALIGN || stat == HUD_STAT_OFFSET)
v2fdata = readV2F1000(is); v2fdata = readV2F1000(is);
else if (stat == HUD_STAT_NAME || stat == HUD_STAT_TEXT) else if (stat == HUD_STAT_NAME || stat == HUD_STAT_TEXT)
sdata = deSerializeString(is); sdata = deSerializeString(is);
Expand Down

0 comments on commit 33dd267

Please sign in to comment.