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:
Dav999-v
2022-12-29 05:02:09 +01:00
committed by Misa Elizabeth Kai
parent f8fd51fc95
commit 72f030fd8e
2 changed files with 5 additions and 1 deletions

View File

@@ -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)
{