mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Get rid of variable-length array
This commit is contained in:
parent
f63385de08
commit
794de84961
@ -18,15 +18,12 @@ bool badge_exists(const char* filepath)
|
||||
|
||||
void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
||||
{
|
||||
char badge_file[16];
|
||||
char fullpath[PATH_MAX_LENGTH];
|
||||
const char * locked_suffix = (badges->badge_locked[i] == true)
|
||||
? "_lock.png" : ".png";
|
||||
unsigned int bufferSize = 16;
|
||||
|
||||
/* TODO/FIXME - variable length forbidden in C89 - rewrite this! */
|
||||
char badge_file[bufferSize];
|
||||
|
||||
snprintf(badge_file, bufferSize, "%s", badges->badge_id_list[i]);
|
||||
snprintf(badge_file, sizeof(badge_file), "%s", badges->badge_id_list[i]);
|
||||
strcat(badge_file, locked_suffix);
|
||||
|
||||
fill_pathname_application_special(fullpath,
|
||||
|
Loading…
x
Reference in New Issue
Block a user