forked from Green-Sky/tomato
fix reading char from empty line
This commit is contained in:
parent
11ae259f67
commit
42dd6d16d7
@ -1044,7 +1044,7 @@ void ChatGui4::renderMessageBodyText(Message3Registry& reg, const Message3 e) {
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
do {
|
do {
|
||||||
const auto current_line = msgtext_sv.substr(pos_prev, pos_next - pos_prev);
|
const auto current_line = msgtext_sv.substr(pos_prev, pos_next - pos_prev);
|
||||||
if (current_line.front() == '>') {
|
if (!current_line.empty() && current_line.front() == '>') {
|
||||||
// TODO: theming
|
// TODO: theming
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, {0.3f, 0.9f, 0.1f, 1.f});
|
ImGui::PushStyleColor(ImGuiCol_Text, {0.3f, 0.9f, 0.1f, 1.f});
|
||||||
ImGui::TextUnformatted(current_line.data(), current_line.data()+current_line.size());
|
ImGui::TextUnformatted(current_line.data(), current_line.data()+current_line.size());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user