diff options
| author | Eugene Sandulenko | 2016-02-04 18:30:49 +0100 |
|---|---|---|
| committer | Eugene Sandulenko | 2016-02-14 17:13:01 +0100 |
| commit | 8ee5d6e9d1cda74d4ad35ca4d19a4d36996f11c4 (patch) | |
| tree | ec550b8eeef5607eb2967a7acc96b6ecfd1a6073 | |
| parent | 30713e4262fee800fcbafaab01e7c7b785c5d0c8 (diff) | |
| download | scummvm-rg350-8ee5d6e9d1cda74d4ad35ca4d19a4d36996f11c4.tar.gz scummvm-rg350-8ee5d6e9d1cda74d4ad35ca4d19a4d36996f11c4.tar.bz2 scummvm-rg350-8ee5d6e9d1cda74d4ad35ca4d19a4d36996f11c4.zip | |
WAGE: Fix crash and remove debug output
| -rw-r--r-- | engines/wage/gui.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index fc606e0907..2dc2e69977 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -731,6 +731,10 @@ void Gui::mouseDown(int x, int y) { int Gui::calcTextX(int x, int textLine) { const Graphics::Font *font = getConsoleFont(); + + if (textLine >= _lines.size()) + return 0; + Common::String str = _lines[textLine]; x -= _consoleTextArea.left; @@ -759,21 +763,16 @@ int Gui::calcTextY(int y) { } void Gui::startMarking(int x, int y) { - warning("x: %d y: %d", x, y); _selectionStartY = calcTextY(y); _selectionStartX = calcTextX(x, _selectionStartY); _inTextSelection = true; - - warning("x: %d y: %d -> %d %d", x, y, _selectionStartX, _selectionStartY); } void Gui::updateTextSelection(int x, int y) { _selectionEndY = calcTextY(y); _selectionEndX = calcTextX(x, _selectionEndY); - warning("x: %d y: %d -> %d %d", x, y, _selectionEndX, _selectionEndY); - _consoleFullRedraw = true; } |
