summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-03-25 23:19:41 +0000
committerpeter1138 <peter1138@openttd.org>2017-03-25 23:19:41 +0000
commitdac0a3e86e5db45e0174a1e75be06979f197b0e0 (patch)
treeea220fa945cb9fe2562f9dac2c19db7fd02d3d0c
parent0cf326628064be0ca56843cce352dd235afaa1a5 (diff)
downloadopenttd-dac0a3e86e5db45e0174a1e75be06979f197b0e0.tar.xz
(svn r27829) -Fix (r27821): Occasional crash caused by mixing int/uint arithmetic.
-rw-r--r--src/gfx_func.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfx_func.h b/src/gfx_func.h
index 44f5e5059..99461f907 100644
--- a/src/gfx_func.h
+++ b/src/gfx_func.h
@@ -149,7 +149,7 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh
* @param size The height or width of the object to draw.
* @return Offset of where to start drawing the object.
*/
-static inline int CenterBounds(int min, int max, uint size)
+static inline int CenterBounds(int min, int max, int size)
{
return min + (max - min - size + 1) / 2;
}