[MSPAINT] Fix crash on zoom out

- Check the denominator for zero for both zoomed width and height.
- Do not allow to move zoom slider above possible position.
- Move commonly used `zoomTo` function into new header file.

CORE-14539
This commit is contained in:
Stanislav Motylkov 2018-04-14 15:42:34 +03:00 committed by Benedikt Freisen
parent 065e70048d
commit 955048e50a
5 changed files with 31 additions and 9 deletions

View file

@ -0,0 +1,14 @@
/*
* PROJECT: PAINT for ReactOS
* LICENSE: LGPL
* FILE: base/applications/mspaint/common.h
* PURPOSE: Commonly used functions
* PROGRAMMERS: Benedikt Freisen
* Stanislav Motylkov
*/
#pragma once
/* FUNCTIONS ********************************************************/
extern BOOL zoomTo(int, int, int);