diff --git a/desktop_version/src/VFormat.c b/desktop_version/src/VFormat.c index f71766ea..ae8eff90 100644 --- a/desktop_version/src/VFormat.c +++ b/desktop_version/src/VFormat.c @@ -245,7 +245,8 @@ void vformat_cb_valist( trim_whitespace(&arg_name, &arg_name_len); trim_whitespace(&arg_type, &arg_type_len); - match = (arg_name_len == name_len && SDL_memcmp(arg_name, name, name_len) == 0); + match = (arg_name_len == name_len && SDL_memcmp(arg_name, name, name_len) == 0) + || (arg_name_len == 1 && arg_name[0] == '_'); if (arg_type_len == 3 && SDL_memcmp(arg_type, "int", 3) == 0) { diff --git a/desktop_version/src/VFormat.h b/desktop_version/src/VFormat.h index 3723524b..c2a826f1 100644 --- a/desktop_version/src/VFormat.h +++ b/desktop_version/src/VFormat.h @@ -45,6 +45,9 @@ * - str const char* * - but Controller button icon * + * Special case: if an argument name is a single underscore (_), it matches + * any name not found earlier in the list. This should normally not be needed. + * * Full example: * * char buffer[100];