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 bbf0d478e9
.
This commit is contained in:
parent
b7a58b74f9
commit
8617d69872
@ -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;
|
||||
const 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