aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/supernova/state.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index 3ce044e56c..7f62852911 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -980,8 +980,9 @@ void GameManager::animationOn() {
void GameManager::edit(Common::String &input, int x, int y, uint length) {
bool isEditing = true;
uint cursorIndex = input.size();
- int overdrawWidth = ((length + 1) * kFontWidth > kScreenWidth - x) ?
- kScreenWidth - x : (length + 1) * kFontWidth;
+ // NOTE: Pixels for char needed = kFontWidth + 2px left and right side bearing
+ int overdrawWidth = ((length + 1) * (kFontWidth + 2) > kScreenWidth - x) ?
+ kScreenWidth - x : (length + 1) * (kFontWidth + 2);
while (isEditing) {
_vm->_textCursorX = x;