From 7636b3f77215cc422b7dbf1d636269bea4b01726 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Mon, 17 Nov 2014 17:11:41 +0000 Subject: Fixed wrapping. --- xcb_gol_macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xcb_gol_macro.c') diff --git a/xcb_gol_macro.c b/xcb_gol_macro.c index daab30b..6e04b77 100644 --- a/xcb_gol_macro.c +++ b/xcb_gol_macro.c @@ -61,7 +61,7 @@ void gol_random(Gol *const gol, unsigned const int seed) gol->buffers[gol->front][i] = rand() < 0.5 * ((double)RAND_MAX + 1.0); } -static uint8_t gol_neighbours(Gol *const gol, const uint32_t x, const uint32_t y) +static uint8_t gol_neighbours(Gol *const gol, const int32_t x, const int32_t y) { uint8_t neighbours = 0; for (int8_t dx = -1; dx <= 1; dx++) -- cgit v1.2.3-54-g00ecf