aboutsummaryrefslogtreecommitdiff
path: root/src/Overlay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r--src/Overlay.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 98f2288..794ef92 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -1506,7 +1506,10 @@ namespace gsr {
byte_index += codepoint_length;
}
- str.erase(byte_index);
+ if(byte_index < str.size()) {
+ str.erase(byte_index);
+ str += "...";
+ }
}
static bool is_hex_num(char c) {