From d9604331b823d41cedf3bb5036281522ce6f4f90 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 26 Nov 2006 15:37:24 +0200 Subject: [PATCH] SMJS: keymap_get_property: fix build error Fix an error in the order of variable initialisation that was introduced in commit bbf0d478e934ab12d68d56ea5af755026ed651ac. --- src/scripting/smjs/keybinding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripting/smjs/keybinding.c b/src/scripting/smjs/keybinding.c index f2166ffa7..8f1229153 100644 --- a/src/scripting/smjs/keybinding.c +++ b/src/scripting/smjs/keybinding.c @@ -22,7 +22,6 @@ keymap_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) unsigned char *action_str; const unsigned char *keystroke_str; int *data; - enum keymap_id keymap_id = *data; assert(JS_InstanceOf(ctx, obj, (JSClass *) &keymap_class, NULL)); if_assert_failed return JS_FALSE; @@ -32,7 +31,8 @@ keymap_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) keystroke_str = JS_GetStringBytes(JS_ValueToString(ctx, id)); if (!keystroke_str) goto ret_null; - action_str = get_action_name_from_keystroke(keymap_id, keystroke_str); + action_str = get_action_name_from_keystroke((enum keymap_id) *data, + keystroke_str); if (!action_str) goto ret_null; *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(ctx, action_str));