summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-16 20:35:07 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-16 20:35:07 -0400
commite0fd87411eb5368fee47e268ae03d073293e58c3 (patch)
tree3480ad99c8d2294222a4544f2541d040de58a28b /src
parentc75c9a7170eee423d4b8c654867e1f3d7e1e84bc (diff)
downloadether-e0fd87411eb5368fee47e268ae03d073293e58c3.tar.gz
ether-e0fd87411eb5368fee47e268ae03d073293e58c3.tar.bz2
ether-e0fd87411eb5368fee47e268ae03d073293e58c3.zip
fixed the last word in a line being removed from signs sometimes
Diffstat (limited to 'src')
-rw-r--r--src/sign.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sign.cpp b/src/sign.cpp index 7c4f43f..b9299d6 100644 --- a/src/sign.cpp +++ b/src/sign.cpp
@@ -28,11 +28,16 @@ void Sign::displayMessage(std::string text) {
28 cur = words.front(); 28 cur = words.front();
29 } else if (words.size() == 1) { 29 } else if (words.size() == 1) {
30 lines.push_back({.text = cur, .pause = true}); 30 lines.push_back({.text = cur, .pause = true});
31 cur = "";
31 } 32 }
32 33
33 prev = cur; 34 prev = cur;
34 words.pop_front(); 35 words.pop_front();
35 } 36 }
37
38 if (!cur.empty()) {
39 lines.push_back({.text = cur, .pause = true});
40 }
36 } 41 }
37 42
38 lines.back().pause = true; 43 lines.back().pause = true;