Fix a regression in 0.36.0 that caused using = with single letter options to no longer work correctly

Fixes #8556
This commit is contained in:
Kovid Goyal
2025-04-22 09:44:28 +05:30
parent 53d8ca5d3e
commit 9ef8fa2ae7
2 changed files with 7 additions and 1 deletions

View File

@@ -118,6 +118,9 @@ Detailed list of changes
- panel kitten: Allow specifying panel size in pixels in addition to cells
- Fix a regression in 0.36.0 that caused using = with single letter options to
no longer work correctly (:iss:`8556`)
0.41.1 [2025-04-03]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -407,9 +407,12 @@ handle_option_value:
}
} else {
char buf[2] = {0};
current_option_expecting_argument[0] = 0;
for (int i = 1; arg[i] != 0; i++) {
switch(arg[i]) {
case '=': fprintf(stderr, "= is not allowed in short options, only long options. -d=xyz is illegal, --directory=xyz is legal. Use -d xyz instead.\n"); exit(1); break;
case '=':
arg = arg + i + 1;
goto handle_option_value;
case 'v': opts.version_requested = true; break;
case '1': opts.single_instance = true; break;
default: