X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdraw%2Fao_copy.c;h=312d1d72bc9603ed26f155b527f0de495ccab369;hb=c3dff4d7286991888bd79484c19adccc6926afc1;hp=0e822932d652ebb7315214b92de829c8ad42ab0a;hpb=fbbb3a06e42ec51d5d0582fe674528bd0e9e13f2;p=fw%2Faltos diff --git a/src/draw/ao_copy.c b/src/draw/ao_copy.c index 0e822932..312d1d72 100644 --- a/src/draw/ao_copy.c +++ b/src/draw/ao_copy.c @@ -17,11 +17,11 @@ #define bound(val,max,other) do { \ if (val < 0) { \ - other -= val; \ + other += (typeof(other)) (-val); \ val = 0; \ } \ if (val > max) { \ - other -= (val - max); \ + other -= (typeof(other)) (val - max); \ val = max; \ } \ } while (0)