mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
uppsrc: Undefined Behaviour sanitization
git-svn-id: svn://ultimatepp.org/upp/trunk@13032 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6f9358dbb4
commit
7ab13ffc80
18 changed files with 65 additions and 64 deletions
|
|
@ -85,10 +85,10 @@ Image Upscale2x(const Image& src)
|
|||
struct SFilter : ImageFilter9 { // Improve contours
|
||||
virtual RGBA operator()(const RGBA **mx) {
|
||||
RGBA s = mx[1][1];
|
||||
int l = mx[0][1].a;
|
||||
int r = mx[2][1].a;
|
||||
int t = mx[1][0].a;
|
||||
int b = mx[1][2].a;
|
||||
dword l = mx[0][1].a;
|
||||
dword r = mx[2][1].a;
|
||||
dword t = mx[1][0].a;
|
||||
dword b = mx[1][2].a;
|
||||
int l1 = 110;
|
||||
int l2 = 230;
|
||||
return l * r * t * b != 0 || s.a > l1 || mx[0][1].a > l2 || mx[2][1].a > l2 || mx[1][0].a > l2 || mx[1][2].a > l2 ? s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue