fix format-overflow without extending str buffer

This commit is contained in:
derselbst 2017-08-05 21:10:25 +02:00
parent 7bd07af905
commit a1a6f5bf5d
2 changed files with 2 additions and 2 deletions

View file

@ -1042,7 +1042,7 @@ fluid_defpreset_import_sfont(fluid_defpreset_t* preset,
if (FLUID_STRLEN(sfpreset->name) > 0) {
FLUID_STRCPY(preset->name, sfpreset->name);
} else {
FLUID_SPRINTF(preset->name, "Bank%d,Preset%d", sfpreset->bank, sfpreset->prenum);
FLUID_SPRINTF(preset->name, "Bank%d,Pre%d", sfpreset->bank, sfpreset->prenum);
}
preset->bank = sfpreset->bank;
preset->num = sfpreset->prenum;

View file

@ -435,7 +435,7 @@ struct _fluid_defpreset_t
{
fluid_defpreset_t* next;
fluid_defsfont_t* sfont; /* the soundfont this preset belongs to */
char name[22]; /* the name of the preset */
char name[21]; /* the name of the preset */
unsigned int bank; /* the bank number */
unsigned int num; /* the preset number */
fluid_preset_zone_t* global_zone; /* the global zone of the preset */