aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-10-29 11:14:54 +0100
committer wvpm <24685035+wvpm@users.noreply.github.com>2024-10-29 11:14:54 +0100
commitf0a2711dc57f47fbcea0616f02ed6923d1822da8 (patch)
tree91712ee4712960c6d0010d61d9bad81fbb635f73 /src/openvic-simulation/military
parent0f2074fc51cfab930e2a672125c1625d9a47fb06 (diff)
Allow unit icon to be 0allow_unit_icon_0
Diffstat (limited to 'src/openvic-simulation/military')
-rw-r--r--src/openvic-simulation/military/UnitType.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic-simulation/military/UnitType.cpp b/src/openvic-simulation/military/UnitType.cpp
index 920f28b..c185154 100644
--- a/src/openvic-simulation/military/UnitType.cpp
+++ b/src/openvic-simulation/military/UnitType.cpp
@@ -116,8 +116,8 @@ static bool _check_shared_parameters(std::string_view identifier, UnitType::unit
return false;
}
- if (unit_args.icon <= 0) {
- Logger::error("Invalid icon for unit ", identifier, " - ", unit_args.icon, " (must be positive)");
+ if (unit_args.icon < 0) {
+ Logger::error("Invalid icon for unit ", identifier, " - ", unit_args.icon, " (must be >= 0)");
return false;
}