C++: fix PPToken equals operator for c-strings.

Change-Id: I37411faa1724fb69467036279b2821e33cad26b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2012-12-21 12:30:04 +01:00
parent 9f67321d1f
commit eb09c87d99

View File

@@ -89,7 +89,7 @@ public:
{ return !this->operator==(other); }
bool operator==(const char *other) const
{ return qstrncmp(m_start, other, qstrlen(other)) == 0; }
{ return m_length == (int) qstrlen(other) && !qstrncmp(m_start, other, m_length); }
bool operator!=(const char *other) const
{ return !this->operator==(other); }