mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
param_argument cleanup
This commit is contained in:
parent
1b13c86cc9
commit
bdb238b705
1 changed files with 4 additions and 3 deletions
7
main.c
7
main.c
|
@ -87,10 +87,11 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
#define param_argument(argtype) do { \
|
||||
if (argv[1][2]) \
|
||||
if (argv[1][2]) { \
|
||||
items_add((argitem){util_strdup(&argv[1][2]), argtype}); \
|
||||
else { \
|
||||
++argv; --argc; \
|
||||
} else { \
|
||||
++argv; \
|
||||
--argc; \
|
||||
if (argc <= 1) \
|
||||
goto clean_params_usage; \
|
||||
items_add((argitem){util_strdup(&argv[1][0]), argtype}); \
|
||||
|
|
Loading…
Reference in a new issue