From 12932bf7884ae544a08181ad0c11d8ef30cde365 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 30 Dec 2013 06:46:57 -0800 Subject: [PATCH] fix crash on 64-bit system --- xwords4/linux/gtkdraw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/linux/gtkdraw.c b/xwords4/linux/gtkdraw.c index 1d26c69f1..7794e6d40 100644 --- a/xwords4/linux/gtkdraw.c +++ b/xwords4/linux/gtkdraw.c @@ -1313,12 +1313,12 @@ gtkDrawCtxtMake( GtkWidget* drawing_area, GtkGameGlobals* globals ) GtkDrawCtx* dctx = g_malloc0( sizeof(GtkDrawCtx) ); GdkColormap* map; - short i; + short ii; dctx->vtable = g_malloc( sizeof(*(((GtkDrawCtx*)dctx)->vtable)) ); - for ( i = 0; i < sizeof(*dctx->vtable)/4; ++i ) { - ((void**)(dctx->vtable))[i] = draw_doNothing; + for ( ii = 0; ii < VSIZE(dctx->vtable); ++ii ) { + ((void**)(dctx->vtable))[ii] = draw_doNothing; /* bad? */ } SET_VTABLE_ENTRY( dctx->vtable, draw_clearRect, gtk );