[MSPAINT] Fix crash on zoom out
authorStanislav Motylkov <x86corez@gmail.com>
Sat, 14 Apr 2018 12:42:34 +0000 (15:42 +0300)
committerBenedikt Freisen <b.freisen@gmx.net>
Mon, 23 Apr 2018 18:11:43 +0000 (20:11 +0200)
commit955048e50a79996e69baec6c6b9c495e5155db24
tree778893320c7e7bec0dcf7f153eb914b0cc43ebe4
parent065e70048daa70bbe2db15175441c627782ad11d
[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
base/applications/mspaint/common.h [new file with mode: 0644]
base/applications/mspaint/imgarea.cpp
base/applications/mspaint/precomp.h
base/applications/mspaint/toolsettings.cpp
base/applications/mspaint/winproc.cpp