diff --git a/src/Application/Application_MassViewer_Weapons.cpp b/src/Application/Application_MassViewer_Weapons.cpp index a9e3281..d23a1cd 100644 --- a/src/Application/Application_MassViewer_Weapons.cpp +++ b/src/Application/Application_MassViewer_Weapons.cpp @@ -467,8 +467,8 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) { if(map->find(part.id) != map->cend()) { ImGui::TextUnformatted(map->at(part.id).cbegin(), map->at(part.id).cend()); } - else if(part.id == -1) { - ImGui::TextUnformatted(""); + else if(part.id < 0) { + ImGui::TextUnformatted(""); } else{ ImGui::Text("ID: %i", part.id); @@ -498,7 +498,7 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) { ImGui::SameLine(); if(ImGui::SmallButton("Hide part " ICON_FA_QUESTION_CIRCLE)) { - part.id = 96 + (part.id / 100) * 100; + part.id = 96 + part.id >= 0 ? (part.id / 100) * 100 : 0; } drawTooltip(_selectedWeaponPart == 0 ? "This will hide the selected part, but not its accessories. "