Changed svc_menu type cast to signed

This commit is contained in:
Jordan Cristiano 2015-07-11 02:23:18 -04:00
parent ef50be7054
commit 1b90dc6298

View File

@ -29,7 +29,7 @@ namespace NetHandlers
bool SVC_Menu_BitWrite_Internal(BitWrite& bitbuf, const SourceGameContext& context, NetMsg::SVC_Menu* data) bool SVC_Menu_BitWrite_Internal(BitWrite& bitbuf, const SourceGameContext& context, NetMsg::SVC_Menu* data)
{ {
bitbuf.WriteShort(static_cast<uint16_t>(data->type)); bitbuf.WriteShort(static_cast<int16_t>(data->type));
bitbuf.WriteWord(data->dataLengthInBytes); bitbuf.WriteWord(data->dataLengthInBytes);
bitbuf.WriteBytes(data->menuBinaryKeyValues.get(), data->dataLengthInBytes); bitbuf.WriteBytes(data->menuBinaryKeyValues.get(), data->dataLengthInBytes);
return !bitbuf.IsOverflowed(); return !bitbuf.IsOverflowed();
@ -55,7 +55,7 @@ namespace NetHandlers
// binary keyvalues in form [type][name][value] // binary keyvalues in form [type][name][value]
// [char][cstr][type] // [char][cstr][type]
const char* name = KeyValuesBin_GetName(data->menuBinaryKeyValues.get(), data->dataLengthInBytes); const char* name = KeyValuesBin_GetName(data->menuBinaryKeyValues.get(), data->dataLengthInBytes);
out << "svc_Menu: " << static_cast<uint16_t>(data->type) out << "svc_Menu: " << static_cast<int16_t>(data->type)
<< " \"" << (name ? name : "No KeyValues") << " \"" << (name ? name : "No KeyValues")
<< "\" (len:" << data->dataLengthInBytes << ")"; << "\" (len:" << data->dataLengthInBytes << ")";
} }