ulib parse boolean arguments

This commit is contained in:
2025-09-17 22:07:42 +02:00
parent 6a8af7727e
commit ac1cc172f7
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,9 @@ int32_t parse_args(char **argv, size_t argc, Arg *defs) {
case ARG_STRING:
*((char **)def->ptr) = argv[i+1];
break;
case ARG_BOOL:
*((bool *)def->ptr) = string_strcmp(argv[i+1], "yes") == 0;
break;
}
i++;
}