[Scummvm-git-logs] scummvm master -> da40bdf6e5a0e4b9843127f9937bb64ea8c3ae2c
dreammaster
noreply at scummvm.org
Sat Apr 1 22:26:41 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
da40bdf6e5 NUVIE: Fix Ultima 6 failed assert on click during prompt
Commit: da40bdf6e5a0e4b9843127f9937bb64ea8c3ae2c
https://github.com/scummvm/scummvm/commit/da40bdf6e5a0e4b9843127f9937bb64ea8c3ae2c
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-04-01T15:26:37-07:00
Commit Message:
NUVIE: Fix Ultima 6 failed assert on click during prompt
Fix failed assertion on left-clicking while a "new style" prompt
is displayed:
"engines/ultima/shared/std/string.h:93:
char& Ultima::Std::string::operator[](size_t):
Assertion `idx < _size' failed."
To reproduce the bug:
1. Enable "new style" in video options
2. Go to the two pools near the castle entrance
3. Use the fountain on the top left part of a pool
4. Left-click anywhere while the prompt is open
Changed paths:
engines/ultima/nuvie/gui/widgets/msg_scroll.cpp
diff --git a/engines/ultima/nuvie/gui/widgets/msg_scroll.cpp b/engines/ultima/nuvie/gui/widgets/msg_scroll.cpp
index aba1f5c07a8..ef81e4f587d 100644
--- a/engines/ultima/nuvie/gui/widgets/msg_scroll.cpp
+++ b/engines/ultima/nuvie/gui/widgets/msg_scroll.cpp
@@ -881,7 +881,7 @@ GUI_status MsgScroll::MouseUp(int x, int y, Shared::MouseButton button) {
if (button == 1) { // left click == select word
if (input_mode) {
token_str = get_token_string_at_pos(x, y);
- if (permit_input != NULL) {
+ if (permit_input != NULL && token_str.length()) {
if (strchr(permit_input, token_str[0])
|| strchr(permit_input, tolower(token_str[0]))) {
input_buf_add_char(token_str[0]);
More information about the Scummvm-git-logs
mailing list