Cleanup fix for equip item crash on Linux

Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
experimental-mono
Sam Hellawell 6 years ago
parent db2b3e95b8
commit df1667b6e4

@ -28,12 +28,9 @@ namespace mwmp
if (!isRequest()) if (!isRequest())
{ {
// Due to a bug on Linux w/ vsnprintf, we have to append soul as string here instead LOG_APPEND(Log::LOG_INFO, "- refId: %s, count: %i, charge: %i, enchantmentCharge: %f, soul: %s",
std::string msgStr = "- refId: %s, count: %i, charge: %f, enchantmentCharge: %f, soul: " + player->usedItem.soul;
LOG_APPEND(Log::LOG_INFO, msgStr.c_str(),
player->usedItem.refId.c_str(), player->usedItem.count, player->usedItem.charge, player->usedItem.refId.c_str(), player->usedItem.count, player->usedItem.charge,
player->usedItem.enchantmentCharge); player->usedItem.enchantmentCharge, player->usedItem.soul.c_str());
MWWorld::Ptr playerPtr = MWBase::Environment::get().getWorld()->getPlayerPtr(); MWWorld::Ptr playerPtr = MWBase::Environment::get().getWorld()->getPlayerPtr();
MWWorld::InventoryStore &inventoryStore = playerPtr.getClass().getInventoryStore(playerPtr); MWWorld::InventoryStore &inventoryStore = playerPtr.getClass().getInventoryStore(playerPtr);

Loading…
Cancel
Save