GUI: fix formatting of messages with only one sentence.

This commit is contained in:
whitequark 2018-07-18 02:19:35 +00:00
parent 7630e0e4e2
commit 0fb9a4cc23

View File

@ -128,10 +128,13 @@ static void MessageBox(const char *fmt, va_list va, bool error)
break; break;
} }
} }
std::string message = text.substr(0, separatorAt + 1); std::string message = text;
std::string description; std::string description;
if(separatorAt != std::string::npos && separatorAt + 1 < text.size()) { if(separatorAt != std::string::npos) {
description = text.substr(separatorAt + 1); message = text.substr(0, separatorAt + 1);
if(separatorAt + 1 < text.size()) {
description = text.substr(separatorAt + 1);
}
} }
std::string::iterator it = description.begin(); std::string::iterator it = description.begin();