Skip to content

Commit e49e432

Browse files
committed
ANDROID: fix crash with INPUT command while scrolled #160
1 parent f44f53f commit e49e432

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2022-11-06 (12.25)
2+
ANDROID: fix crash with INPUT command while scrolled #160
3+
14
2022-08-26 (12.25)
25
CONSOLE: Fixed TAB handling
36
COMMON: Only TRIM Strings

src/platform/android/jni/display.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#include "config.h"
10-
#include <time.h>
10+
#include <ctime>
1111
#include "platform/android/jni/display.h"
1212
#include "ui/utils.h"
1313
#include "common/device.h"
@@ -82,13 +82,13 @@ void Canvas::fillRect(int left, int top, int width, int height, pixel_t drawColo
8282
} else {
8383
for (int y = 0; y < height; y++) {
8484
int posY = y + top;
85-
if (posY == _h) {
85+
if (posY >= _h) {
8686
break;
8787
} else if (posY >= dtY) {
8888
pixel_t *line = getLine(posY);
8989
for (int x = 0; x < width && line; x++) {
9090
int posX = x + left;
91-
if (posX == _w) {
91+
if (posX >= _w) {
9292
break;
9393
} else if (posX >= dtX) {
9494
line[posX] = drawColor;
@@ -187,7 +187,7 @@ void Graphics::redraw() {
187187
bool Graphics::resize() {
188188
bool result;
189189
if (_screen == nullptr || _screen->_w != _w || _screen->_h != _h) {
190-
Canvas *newScreen = new Canvas();
190+
auto *newScreen = new Canvas();
191191
result = newScreen->create(_w, _h);
192192
if (result) {
193193
delete _screen;

0 commit comments

Comments
 (0)