mirror of
https://github.com/holub/mame
synced 2025-05-28 08:33:05 +03:00
Fixed unicode crashing bug with input names.
This commit is contained in:
parent
be21ac9e08
commit
edb6e3de5a
@ -1229,7 +1229,7 @@ static const char *dinput_device_item_name(device_info *devinfo, int offset, con
|
||||
return utf8_from_tstring(namestring);
|
||||
|
||||
// otherwise, allocate space to add the suffix
|
||||
combined = malloc_or_die(_tcslen(namestring) + 1 + _tcslen(suffix) + 1);
|
||||
combined = malloc_or_die(sizeof(TCHAR) * (_tcslen(namestring) + 1 + _tcslen(suffix) + 1));
|
||||
_tcscpy(combined, namestring);
|
||||
_tcscat(combined, TEXT(" "));
|
||||
_tcscat(combined, suffix);
|
||||
|
Loading…
Reference in New Issue
Block a user