From 9840f0005a6cf75098df6197d851845d7938db99 Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 27 Dec 2015 22:42:23 +0100 Subject: [PATCH] removed unnecessary check from parseHex() --- src/lib/ebus/symbol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ebus/symbol.cpp b/src/lib/ebus/symbol.cpp index 44045328..495c2982 100644 --- a/src/lib/ebus/symbol.cpp +++ b/src/lib/ebus/symbol.cpp @@ -67,7 +67,7 @@ result_t SymbolString::parseHex(const string& str, const bool isEscaped) const char* strBegin = str.substr(i, 2).c_str(); unsigned long int value = strtoul(strBegin, &strEnd, 16); - if (strEnd == NULL || *strEnd != 0 || strEnd != strBegin+2 || value > 0xff) + if (strEnd == NULL || strEnd != strBegin+2 || value > 0xff) return RESULT_ERR_INVALID_NUM; // invalid value push_back((unsigned char)value, isEscaped, addCrc);