summaryrefslogtreecommitdiffhomepage
path: root/Stars45
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-07-16 17:38:23 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-07-16 17:38:23 +0000
commitb2a91aa48621a797648ddef05c70035dfb61032d (patch)
tree0650ceaa8949d2c0b0942c851828e74a3cfec11b /Stars45
parentbdef90f99176d98cba7653b9a9ed4fdce362d2b7 (diff)
downloadstarshatter-b2a91aa48621a797648ddef05c70035dfb61032d.zip
starshatter-b2a91aa48621a797648ddef05c70035dfb61032d.tar.gz
starshatter-b2a91aa48621a797648ddef05c70035dfb61032d.tar.bz2
PVS Studio warning fix: Part of conditional expression is always false
Diffstat (limited to 'Stars45')
-rw-r--r--Stars45/MapView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Stars45/MapView.cpp b/Stars45/MapView.cpp
index 5463e39..c791cf1 100644
--- a/Stars45/MapView.cpp
+++ b/Stars45/MapView.cpp
@@ -2912,8 +2912,8 @@ MapView::DrawCombatGroup(CombatGroup* group, int rep)
nsprites = unit->GetDesign()->map_sprites.size();
if (nsprites) {
- if (sprite_index < 0 || sprite_index >= nsprites)
- sprite_index = sprite_index % nsprites;
+ if (sprite_index >= nsprites)
+ sprite_index = sprite_index % nsprites;
Bitmap* map_sprite = unit->GetDesign()->map_sprites[sprite_index];