projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
altos/draw: Add transforms to polygon code
[fw/altos]
/
src
/
draw
/
ao_copy.c
diff --git
a/src/draw/ao_copy.c
b/src/draw/ao_copy.c
index 0e822932d652ebb7315214b92de829c8ad42ab0a..312d1d72bc9603ed26f155b527f0de495ccab369 100644
(file)
--- 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)