From 709506e6d6e35b617f8db647778478f351030902 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 31 Jan 2013 14:47:08 -0300 Subject: [PATCH] ubb-la/gui.c (show_map): fix calculation of middle point Also here, we need to take into account that "pos" is zero-based. --- ubb-la/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubb-la/gui.c b/ubb-la/gui.c index 117a30b..5dc5dec 100644 --- a/ubb-la/gui.c +++ b/ubb-la/gui.c @@ -175,7 +175,7 @@ static void textf(int x, int y, uint32_t color, const char *fmt, ...) static void show_map(int skip, int nibbles, int s0, int s1) { int w = nibbles-skip; - int m = (nibbles+skip) >> 1; + int m = (nibbles-skip) >> 1; int scale = 0; int x0, x1;