Skip to content

Commit

Permalink
fix handling of options to be saved (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Dec 13, 2023
1 parent a55d3e7 commit f1f764a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/config.c
Expand Up @@ -847,7 +847,7 @@ static struct {
char * comment;
ushort opti;
} file_opts[lengthof(options) + MAX_COMMENTS];
static uchar arg_opts[lengthof(options)];
static ushort arg_opts[lengthof(options)];
static uint file_opts_num = 0;
static uint arg_opts_num;

Expand All @@ -874,7 +874,10 @@ seen_file_option(uint i)
static bool
seen_arg_option(uint i)
{
return memchr(arg_opts, i, arg_opts_num);
for (uint k = 0; k < arg_opts_num; k++)
if (arg_opts[k] == i)
return true;
return false;
}

static void
Expand Down
2 changes: 1 addition & 1 deletion wiki/Changelog.md
@@ -1,5 +1,5 @@
Misc
* Fix handling of options to be saved (#1246).
* Fix handling of options to be saved (#1246, #1247).
* Tune and fix click-opening URL (mintty/wsltty#346).

Configuration
Expand Down

0 comments on commit f1f764a

Please sign in to comment.