Browse Source

修正打印结果的描述。

sat23 3 years ago
parent
commit
748ad5f41f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      TCLCommand/TCLCommand/Command.cpp

+ 2 - 2
TCLCommand/TCLCommand/Command.cpp

@@ -367,9 +367,9 @@ bool TCLCommand::TheSecondPart(CommandParam& cmdPara, std::string data)
 
         if (_tcsicmp(cmdPara.code.c_str(), utils::ByteToChars((byte)data[nDataPos] - 1).c_str()) != 0) {
 #if _MSC_VER >= 1200 && _MSC_VER < 1500
-			cmdPara._rtnError = utils::_dprintf(_T("返回的指令码错误, 正确:%02X, 当前:%02X"), utils::TwoHexCharToInteger(cmdPara.code[0],cmdPara.code[1]), (byte)data[nDataPos]);
+			cmdPara._rtnError = utils::_dprintf(_T("返回的指令码错误, 正确:%02X, 当前:%02X"), utils::TwoHexCharToInteger(cmdPara.code[0],cmdPara.code[1])+1, (byte)data[nDataPos]);
 #elif _MSC_VER >= 1500
-            cmdPara._rtnError = utils::_dprintf(_T("[%s] 返回的指令码错误, 正确:%02X, 当前:%02X"), __FUNCTION__, utils::TwoHexCharToInteger(cmdPara.code[0],cmdPara.code[1]), (byte)data[nDataPos]);
+            cmdPara._rtnError = utils::_dprintf(_T("[%s] 返回的指令码错误, 正确:%02X, 当前:%02X"), __FUNCTION__, utils::TwoHexCharToInteger(cmdPara.code[0],cmdPara.code[1])+1, (byte)data[nDataPos]);
 #endif
             return false;
         }