1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

SMJS: keymap_get_property: fix build error

Fix an error in the order of variable initialisation that was introduced
in commit 9a829b3277.

(Copied from a2c48b4d91fe6c6998836deca73eb93d324630df in ELinks 0.12.GIT.)
This commit is contained in:
Kalle Olavi Niemitalo 2006-11-26 15:37:24 +02:00 committed by Kalle Olavi Niemitalo
parent a44e72161f
commit f2854e19ba

View File

@ -22,7 +22,6 @@ keymap_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
unsigned char *action_str;
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));