소스 검색

Fix incorrect assertion in CArtPlace::setArtifact

This fixes a crash in debug builds when the player tries to access
a hero's inventory and the hero has a "Summon Boat" spell scroll.
Vasily Postnicov 5 달 전
부모
커밋
db2997f240
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      client/widgets/CComponentHolder.cpp

+ 1 - 1
client/widgets/CComponentHolder.cpp

@@ -117,7 +117,7 @@ void CArtPlace::setArtifact(const ArtifactID & newArtId, const SpellID & newSpel
 	if(artId == ArtifactID::SPELL_SCROLL)
 	{
 		spellId = newSpellId;
-		assert(spellId.num > 0);
+		assert(spellId != SpellID::NONE);
 
 		if(settings["general"]["enableUiEnhancements"].Bool())
 		{