mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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:
parent
0744d96213
commit
a44e72161f
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user