strcpy(istr,fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */"{:s} of {:s}"),item._iIName,pgettext("spell",spelldata[bs].sNameText)).c_str());
strcpy(item._iIName,istr);
strncpy(item._iIName,fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */"{0} of {1}"),item._iIName,pgettext("spell",spelldata[bs].sNameText)).c_str(),sizeof(item._iIName)-1);
item._iIName[sizeof(item._iIName)-1]='\0';
if(item._iMagical==ITEM_QUALITY_NORMAL)
strcpy(item._iName,item._iIName);
}
@ -1197,7 +1195,6 @@ void GetStaffPower(Item &item, int lvl, int bs, bool onlygood)
@ -1254,8 +1251,8 @@ void GetItemPower(Item &item, int minlvl, int maxlvl, affix_item_type flgs, bool
}
if(nl!=0){
sufidx=l[GenerateRnd(nl)];
strcpy(istr,fmt::format(_("{:s} of {:s}"),item._iIName,_(ItemSuffixes[sufidx].PLName)).c_str());
strcpy(item._iIName,istr);
strncpy(item._iIName,fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */"{0} of {1}"),item._iIName,_(ItemSuffixes[sufidx].PLName)).c_str(),sizeof(item._iIName)-1);
item._iIName[sizeof(item._iIName)-1]='\0';
item._iMagical=ITEM_QUALITY_MAGIC;
SaveItemAffix(item,ItemSuffixes[sufidx]);
item._iSufPower=ItemSuffixes[sufidx].power.type;
@ -1269,12 +1266,12 @@ void GetItemPower(Item &item, int minlvl, int maxlvl, affix_item_type flgs, bool
strcpy(istr,fmt::format(_("{:s} of {:s}"),item._iIName,_(ItemSuffixes[sufidx].PLName)).c_str());
strcpy(item._iIName,istr);
strncpy(item._iIName,fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */"{0} of {1}"),item._iIName,_(ItemSuffixes[sufidx].PLName)).c_str(),sizeof(item._iIName)-1);