From 07dffdcbc2bf35e090c9f681ff3bea5fddd906a2 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 25 Jan 2015 21:36:24 +0100 Subject: [PATCH] Fixed bug with comparing versions --- src/graphics/graphics_restrictions.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/graphics/graphics_restrictions.cpp b/src/graphics/graphics_restrictions.cpp index c8c5a3d29..597a3878d 100644 --- a/src/graphics/graphics_restrictions.cpp +++ b/src/graphics/graphics_restrictions.cpp @@ -217,7 +217,7 @@ public: for(unsigned int i=0; i other.m_version[i]) return false; + if (m_version[i] < other.m_version[i]) return true; } - return true; - } // operator> + if (m_version.size() >= other.m_version.size()) + return false; + else + return true; + } // operator< // ------------------------------------------------------------------------ /** If *this <= other. */ bool operator<= (const Version &other) const @@ -247,8 +251,11 @@ public: if (m_version[i] > other.m_version[i]) return false; if (m_version[i] < other.m_version[i]) return true; } - return true; - } // operator> + if (m_version.size() > other.m_version.size()) + return false; + else + return true; + } // operator<= }; // class Version // ============================================================================