Commit 94b23518 authored by Grider Li's avatar Grider Li Committed by Fushan Wen
Browse files

Fix z-modem detection by using proper string index

(cherry picked from commit dd52d722)
parent 922abd0c
Pipeline #192413 passed with stage
in 2 minutes and 26 seconds
......@@ -244,7 +244,7 @@ void Emulation::receiveData(const char *text, int length)
// this check into the above for loop?
auto *found = static_cast<const char *>(memchr(text, '\030', length));
if (found) {
auto startPos = text - found;
auto startPos = found - text;
if (startPos < 0) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment