File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1174,9 +1174,21 @@ void Client::handleCommand_HudSetParam(NetworkPacket* pkt)
1174
1174
player->hud_hotbar_itemcount = hotbar_itemcount;
1175
1175
}
1176
1176
else if (param == HUD_PARAM_HOTBAR_IMAGE) {
1177
+ // If value not empty verify image exists in texture source
1178
+ if (value != " " && !getTextureSource ()->isKnownSourceImage (value)) {
1179
+ errorstream << " Server sent wrong Hud hotbar image (sent value: '"
1180
+ << value << " ')" << std::endl;
1181
+ return ;
1182
+ }
1177
1183
player->hotbar_image = value;
1178
1184
}
1179
1185
else if (param == HUD_PARAM_HOTBAR_SELECTED_IMAGE) {
1186
+ // If value not empty verify image exists in texture source
1187
+ if (value != " " && !getTextureSource ()->isKnownSourceImage (value)) {
1188
+ errorstream << " Server sent wrong Hud hotbar selected image (sent value: '"
1189
+ << value << " ')" << std::endl;
1190
+ return ;
1191
+ }
1180
1192
player->hotbar_selected_image = value;
1181
1193
}
1182
1194
}
You can’t perform that action at this time.
0 commit comments