1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-15 14:54:40 -04:00

SMJS: keymap_set_property: fix build error

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

(Copied from eaed0315993b07a20211b151a53ba7bd4553dff0 in ELinks 0.12.GIT.)
This commit is contained in:
Miciah Dashiel Butler Masters 2006-11-26 12:41:32 +00:00 committed by Kalle Olavi Niemitalo
parent 0744d96213
commit a44e72161f

View File

@ -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));