diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-07 12:26:22 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-07 12:26:22 -0500 |
| commit | 3ea8540ec6ea689cc36a2b134879bd14c11888e0 (patch) | |
| tree | 0acf71e96e957ed2ae98346e5fd9ef9e58dcb9f8 /stdlib | |
| parent | 1c909015534ac9e94d48d1fe61febb6299ba3da6 (diff) | |
Incremental improvement to parsing `none` for optional arguments
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/stdlib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index efee2a05..bf17aaf4 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -72,6 +72,9 @@ static bool parse_single_arg(const TypeInfo_t *info, char *arg, void *dest) { if (!arg) return false; + if (info->tag == OptionalInfo && streq(arg, "none")) + return true; + while (info->tag == OptionalInfo) info = info->OptionalInfo.type; |
