From ee938e2cd17aae4a696771bbc4ea4c6857d004e0 Mon Sep 17 00:00:00 2001 From: coderJeff Date: Sat, 26 May 2018 16:47:29 -0400 Subject: [PATCH] #857: fix PAINT used in a VIEWport causing segfault - PAINT used in a VIEWport and without delimitation border induces segmentation violation when ending code - was caused by wrong calculation to update fbgfx "dirty" array --- changelog.txt | 1 + src/gfxlib2/gfx_paint.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 31bdcf3638..8b09b84ef2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -49,6 +49,7 @@ Version 1.06.0 - #846: Fix compiler crash on global variable initializer with type(...) expression where T isn't a UDT - #847: Windows API binding: Fixed winnt.bi SECURITY_*_AUTHORITY initializers - #851: '#LINE line filename' only changed the source filename in error messages, not in debug info +- #857: PAINT used in a VIEWport and without delimitation border induces segmentation violation when ending code - #832: Fix bug allowing QB style suffixes on all keywords, regardless of -lang - #841: The unary negation operator gave different result signedness when used on constant instead of non-constant expression. Now the result is always signed. - Incorrect C++ mangling for BYREF parameters using built-in types diff --git a/src/gfxlib2/gfx_paint.c b/src/gfxlib2/gfx_paint.c index f8fe710846..e72ff7af40 100644 --- a/src/gfxlib2/gfx_paint.c +++ b/src/gfxlib2/gfx_paint.c @@ -149,7 +149,7 @@ FBCALL void fb_GfxPaint(void *target, float fx, float fy, unsigned int color, un } if (__fb_gfx->framebuffer == context->line[0]) - __fb_gfx->dirty[context->view_y + y] = TRUE; + __fb_gfx->dirty[y] = TRUE; } } free(span);