changeset 1555:9c4cf5b07e98

Minor assert fixes in players.cpp
author Grumpy7
date Sat, 07 Sep 2013 21:17:47 +0200
parents e303d8a9bcdc
children 6292a522d322 30db6d265ceb
files Player.cpp
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Player.cpp	Sat Sep 07 21:14:48 2013 +0200
+++ b/Player.cpp	Sat Sep 07 21:17:47 2013 +0200
@@ -340,7 +340,6 @@
 int Player::GetBuyingPrice(unsigned int uRealValue, float price_multiplier)
 {
   uint price = (uint)(((100 - GetMerchant()) * (uRealValue * price_multiplier)) / 100);
-  Assert (price > 0);
 
   if (price < uRealValue)
     price = uRealValue;
@@ -810,8 +809,7 @@
     texture->Release();
     pIcons_LOD->SyncLoadedFilesCount();
   }
-
-    assert("Items should have nonzero dimensions");
+  Assert(slotHeight > 0 && slotWidth > 0, "Items should have nonzero dimensions");
   if ( (slotWidth + uSlot % INVETORYSLOTSWIDTH) <= INVETORYSLOTSWIDTH && (slotHeight + uSlot / INVETORYSLOTSWIDTH) <= INVETORYSLOTSHEIGHT )
   {
       for (unsigned int x = 0; x < slotWidth; x++)