diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-16 20:35:07 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-16 20:35:07 -0400 |
commit | e0fd87411eb5368fee47e268ae03d073293e58c3 (patch) | |
tree | 3480ad99c8d2294222a4544f2541d040de58a28b | |
parent | c75c9a7170eee423d4b8c654867e1f3d7e1e84bc (diff) | |
download | ether-e0fd87411eb5368fee47e268ae03d073293e58c3.tar.gz ether-e0fd87411eb5368fee47e268ae03d073293e58c3.tar.bz2 ether-e0fd87411eb5368fee47e268ae03d073293e58c3.zip |
fixed the last word in a line being removed from signs sometimes
-rw-r--r-- | src/sign.cpp | 5 |
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; |