mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Support underscore (_) in VFormat arg name
This is needed for the limits check in the translator menu. This commit is part of rewritten history of the localization branch. The original (unsquashed) commit history can be found here: https://github.com/Dav999-v/VVVVVV/tree/localization-orig
This commit is contained in:
parent
f8fd51fc95
commit
72f030fd8e
2 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue