[Scummvm-git-logs] scummvm master -> 1398b32587644a2b84d80c02fae1c4a80ec4979a
eriktorbjorn
noreply at scummvm.org
Fri Dec 17 12:38:38 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fe16f6f924 SHERLOCK: Fix crash when using Delete key in Rose Tattoo save dialog
1398b32587 NEWS: Mention Rose Tattoo save dialog crash fix
Commit: fe16f6f92400258eb0e23270764c72af48bddb02
https://github.com/scummvm/scummvm/commit/fe16f6f92400258eb0e23270764c72af48bddb02
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-17T13:37:43+01:00
Commit Message:
SHERLOCK: Fix crash when using Delete key in Rose Tattoo save dialog
Changed paths:
engines/sherlock/tattoo/widget_files.cpp
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp
index 77f094ece4..4499ff80ac 100644
--- a/engines/sherlock/tattoo/widget_files.cpp
+++ b/engines/sherlock/tattoo/widget_files.cpp
@@ -370,11 +370,11 @@ bool WidgetFiles::getFilename() {
cursorColor = 192;
else
cursorColor = 200;
- } else if (keyState.keycode == Common::KEYCODE_DELETE) {
+ } else if (keyState.keycode == Common::KEYCODE_DELETE && index < (int)filename.size()) {
filename.deleteChar(index);
_surface.fillRect(Common::Rect(pt.x, pt.y, _bounds.right - BUTTON_SIZE - 9, pt.y + _surface.fontHeight()), TRANSPARENCY);
- _surface.writeString(filename + index, pt, COMMAND_HIGHLIGHTED);
+ _surface.writeString(Common::String(filename.c_str() + index), pt, COMMAND_HIGHLIGHTED);
} else if (keyState.keycode == Common::KEYCODE_RETURN) {
done = 1;
} else if (keyState.keycode == Common::KEYCODE_ESCAPE) {
Commit: 1398b32587644a2b84d80c02fae1c4a80ec4979a
https://github.com/scummvm/scummvm/commit/1398b32587644a2b84d80c02fae1c4a80ec4979a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-17T13:37:56+01:00
Commit Message:
NEWS: Mention Rose Tattoo save dialog crash fix
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 311a317f98..02fb971b66 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -52,6 +52,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Fix crash when moving cursor past end of string in Rose Tattoo save dialog.
- Process pending key presses in the order they were made, not the most
recent first.
+ - Fix crash when using Delete key in Rose Tatto save dialog.
Xeen:
- Fix crash on startup loading constants from xeen.ccs.
More information about the Scummvm-git-logs
mailing list