From b5028efc1fa862073c908c435f84098ccd246fdc Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Sun, 14 Oct 2018 23:36:14 +0100 Subject: Fix: Protect against a few out of bounds or uninitialised usage errors --- src/window.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index d7911bfa4..cd8769e27 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -938,6 +938,8 @@ static void DrawOverlappedWindow(Window *w, int left, int top, int right, int bo void DrawOverlappedWindowForAll(int left, int top, int right, int bottom) { Window *w; + + DrawPixelInfo *old_dpi = _cur_dpi; DrawPixelInfo bk; _cur_dpi = &bk; @@ -951,6 +953,7 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom) DrawOverlappedWindow(w, max(left, w->left), max(top, w->top), min(right, w->left + w->width), min(bottom, w->top + w->height)); } } + _cur_dpi = old_dpi; } /** -- cgit v1.2.3-54-g00ecf