Fixed crash when getting items and some other improper use of std::ostringstream

This commit is contained in:
2014-04-14 15:07:12 -04:00
parent b68abf037d
commit 1ce6c6cc94
2 changed files with 13 additions and 15 deletions

View File

@@ -1063,8 +1063,8 @@ void print_monst_attacks(m_num_t m_type,short target)
////
void damaged_message(short damage,short type)
{
std::ostringstream sout(" ");
sout << get_str("monster-abilities",130 + type);
std::ostringstream sout;
sout << " " << get_str("monster-abilities",130 + type);
sout << " for " << damage;
add_string_to_buf(sout.str().c_str());
}