fix one clear case of unsigned overflow in comp_op_rgba_minus - refs #1679
This commit is contained in:
parent
a25826fb13
commit
9d8be8ea21
1 changed files with 3 additions and 3 deletions
6
deps/agg/include/agg_pixfmt_rgba.h
vendored
6
deps/agg/include/agg_pixfmt_rgba.h
vendored
|
@ -686,9 +686,9 @@ namespace agg
|
|||
}
|
||||
if(sa)
|
||||
{
|
||||
calc_type dr = p[Order::R] - sr;
|
||||
calc_type dg = p[Order::G] - sg;
|
||||
calc_type db = p[Order::B] - sb;
|
||||
calc_type dr = (sr > p[Order::R]) ? 0 : p[Order::R] - sr;
|
||||
calc_type dg = (sg > p[Order::G]) ? 0 : p[Order::G] - sg;
|
||||
calc_type db = (sb > p[Order::B]) ? 0 : p[Order::B] - sb;
|
||||
p[Order::R] = (dr > base_mask) ? 0 : dr;
|
||||
p[Order::G] = (dg > base_mask) ? 0 : dg;
|
||||
p[Order::B] = (db > base_mask) ? 0 : db;
|
||||
|
|
Loading…
Reference in a new issue