From a44e72161fac1f13f7527ad4832d459504785bd0 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sun, 26 Nov 2006 12:41:32 +0000 Subject: [PATCH] SMJS: keymap_set_property: fix build error Fix an error in the order of variable initialisation that was introduced in commit 9a829b3277474d48a55875fb5ea86755981e964b. (Copied from eaed0315993b07a20211b151a53ba7bd4553dff0 in ELinks 0.12.GIT.) --- src/scripting/smjs/keybinding.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/scripting/smjs/keybinding.c b/src/scripting/smjs/keybinding.c index 25ca3458..f66713a9 100644 --- a/src/scripting/smjs/keybinding.c +++ b/src/scripting/smjs/keybinding.c @@ -71,7 +71,6 @@ static JSBool keymap_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) { int *data; - enum keymap_id keymap_id = *data; unsigned char *keymap_str; unsigned char *keystroke_str; @@ -82,7 +81,7 @@ keymap_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) /* Ugly fact: we need to get the string from the id to give to bind_do, * which will of course then convert the string back to an id... */ - keymap_str = get_keymap_name(keymap_id); + keymap_str = get_keymap_name((enum keymap_id) *data); if (!keymap_str) return JS_FALSE; keystroke_str = JS_GetStringBytes(JS_ValueToString(ctx, id));