diff --git a/src/ProxyCommands.cc b/src/ProxyCommands.cc index 1cd8d381..a6d0fc2b 100644 --- a/src/ProxyCommands.cc +++ b/src/ProxyCommands.cc @@ -688,7 +688,11 @@ static HandlerResult process_server_60_62_6C_6D_C9_CB(shared_ptr, true, cmd.area, cmd.x, cmd.z, cmd.request_id); session.next_drop_item.clear(); return HandlerResult::Type::SUPPRESS; - } else if (data[0] == -0x5E) { // A2 + // Note: This static_cast is required to make compilers not complain that + // the comparison is always false (which even happens in some environments + // if we use -0x5E... apparently char is unsigned on some systems, or + // std::string's char_type isn't char??) + } else if (static_cast(data[0]) == 0xA2) { const auto& cmd = check_size_t(data); session.next_drop_item.data.id = session.next_item_id++; send_drop_item(session.server_channel, session.next_drop_item.data,