From: Diego Martínez Date: Tue, 23 Apr 2013 08:06:24 +0000 (-0300) Subject: Fixes possible crash when using hud_change with "align" or "offset" X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=33dd267fd9da1a89b44cd6eab590aadab0f4e335;p=zefram%2Fminetest%2Fminetest_engine.git Fixes possible crash when using hud_change with "align" or "offset" --- diff --git a/src/client.cpp b/src/client.cpp index bd72737f..12ced17f 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2097,7 +2097,8 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) u32 id = readU32(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); else if (stat == HUD_STAT_NAME || stat == HUD_STAT_TEXT) sdata = deSerializeString(is);