From 5f9d512e5c41a9302b5bfd3536215ac854e7945b Mon Sep 17 00:00:00 2001 From: Will Wykeham Date: Wed, 4 Feb 2015 16:23:36 -0500 Subject: [PATCH] Fix bug with command lengths over 127 --- CLI/CLIServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLI/CLIServer.cpp b/CLI/CLIServer.cpp index 9f6ff2fe..debee4e2 100644 --- a/CLI/CLIServer.cpp +++ b/CLI/CLIServer.cpp @@ -202,7 +202,7 @@ void Parser::cliServer() close(i); continue; // go to next socket } - if (len < (int) sizeof(len)) // should never get here + if (nread < (int) sizeof(len)) // should never get here { char buf[BUFSIZ]; sprintf(buf, "Unable to read complete length, s.b. %d bytes, got %d bytes\n", sizeof(len), len);