Skip to content

Commit

Permalink
avoid an error message in mp chat when we run headlessly
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Dec 20, 2014
1 parent 92f687d commit fbb0ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display_chat_manager.cpp
Expand Up @@ -98,7 +98,7 @@ void display_chat_manager::add_chat_message(const time_t& time, const std::strin
try {
// We've had a joker who send an invalid utf-8 message to crash clients
// so now catch the exception and ignore the message.
msg = font::word_wrap_text(msg,font::SIZE_SMALL,my_disp_.map_outside_area().w*3/4);
msg = my_disp_.video().faked() ? "" : font::word_wrap_text(msg,font::SIZE_SMALL,my_disp_.map_outside_area().w*3/4);
} catch (utf8::invalid_utf8_exception&) {
ERR_NG << "Invalid utf-8 found, chat message is ignored." << std::endl;
return;
Expand Down

0 comments on commit fbb0ac5

Please sign in to comment.