1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

In l_set_option, use lua_toboolean for boolean options instead of

lua_tonumber. Now set_option(opt, not get_option(opt)) will always work
to toggle a boolean option.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-17 00:31:45 +00:00 committed by Miciah Dashiel Butler Masters
parent 35e5ec74d2
commit 8edcb292cb

View File

@ -493,6 +493,14 @@ l_set_option(LS)
/* Set option */
switch (opt->type) {
case OPT_BOOL:
{
int value;
value = lua_toboolean(S, 2);
option_types[opt->type].set(opt, (unsigned char *) (&value));
break;
}
case OPT_INT:
case OPT_LONG:
{