From 74782f2e5ce182e05034099ca3dddf40ace4b7d5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 23 Dec 2010 17:50:48 +0000 Subject: [PATCH] fix explicit check to actually be the correct one, and use type instead of variable for sizeof SVN revision: 55741 --- src/bin/e_hints.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index 16ad2d5ac..fcd30809d 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -1436,10 +1436,10 @@ e_hints_window_e_state_get(E_Border *bd) memset(state, 0, sizeof(state)); num = ecore_x_window_prop_card32_get(bd->client.win, E_ATOM_WINDOW_STATE, - state, sizeof(state) / sizeof(state[0])); /* ugly, but avoids possible future overflow if more states are added */ + state, sizeof(state) / sizeof(Ecore_X_Atom)); /* ugly, but avoids possible future overflow if more states are added */ if (!num) return; - for (i = 0; (i < num) && (i < sizeof(state)); i++) + for (i = 0; (i < num) && (i < sizeof(state) / sizeof(Ecore_X_Atom)); i++) { if (state[i] == E_ATOM_WINDOW_STATE_CENTERED) bd->client.e.state.centered = 1;