WncController
Fork of WncControllerLibrary by
Diff: WncController.cpp
- Revision:
- 16:f748245382ac
- Parent:
- 15:2c8211ef69e1
- Child:
- 17:59b1e9341188
--- a/WncController.cpp Sat Sep 10 02:32:47 2016 +0000 +++ b/WncController.cpp Sat Sep 10 02:47:24 2016 +0000 @@ -1662,9 +1662,10 @@ } // If data, convert the hex string into byte values - *numRead = i / 2; + i /= 2; + *numRead = i; while (i > 0) { - i -= 2; + i--; *pS++ = (uint8_t)strtol(pRespStr->substr(pos_start, 2).c_str(), NULL, 16); pos_start += 2; }