Fix: Protect against a few out of bounds or uninitialised usage errors

This commit is contained in:
Charles Pigott
2018-10-14 23:36:14 +01:00
committed by frosch
parent 52ed3bcbaa
commit b5028efc1f
9 changed files with 19 additions and 5 deletions

View File

@@ -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;
}
/**