comparison Monsters.cpp @ 1217:b237a61e61d3

sprintf didn't use .data member of new arrays
author Grumpy7
date Sun, 09 Jun 2013 17:35:10 +0200
parents 8c02e6f74b29
children 5450af4f57ef
comparison
equal deleted inserted replaced
1216:de876af42e0d 1217:b237a61e61d3
1122 if ( pMonsterList->uNumMonsters ) 1122 if ( pMonsterList->uNumMonsters )
1123 { 1123 {
1124 pInfos[curr_rec_num].field_3C_some_special_attack = pMonsterList->GetMonsterIDByName(pTmpBuf.data()) + 1; 1124 pInfos[curr_rec_num].field_3C_some_special_attack = pMonsterList->GetMonsterIDByName(pTmpBuf.data()) + 1;
1125 if ( pInfos[curr_rec_num].field_3C_some_special_attack == -1 ) 1125 if ( pInfos[curr_rec_num].field_3C_some_special_attack == -1 )
1126 { 1126 {
1127 sprintf(Src, "Can't create random monster: '%s' See MapStats!", pTmpBuf); 1127 sprintf(Src, "Can't create random monster: '%s' See MapStats!", pTmpBuf.data());
1128 MessageBoxA(nullptr, Src, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:2239", 0); 1128 MessageBoxA(nullptr, Src, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:2239", 0);
1129 } 1129 }
1130 } 1130 }
1131 pInfos[curr_rec_num].uSpecialAbilityDamageDiceSides = 0; 1131 pInfos[curr_rec_num].uSpecialAbilityDamageDiceSides = 0;
1132 if ( !_stricmp(parsed_field.pProperties[1], "ground") ) 1132 if ( !_stricmp(parsed_field.pProperties[1], "ground") )