From 79ac713dff871c516a60b6c40d68f194e6e40d29 Mon Sep 17 00:00:00 2001 From: Tim Murray-Browne Date: Mon, 5 Oct 2015 12:02:10 +0100 Subject: [PATCH] Fix issue #4 where strings with a length divisible by four are parsed in a way that can prevent subsequent string arguments being correctly parsed. --- libofqf/qoscserver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libofqf/qoscserver.cpp b/libofqf/qoscserver.cpp index eaf65e4..95d7618 100644 --- a/libofqf/qoscserver.cpp +++ b/libofqf/qoscserver.cpp @@ -87,7 +87,8 @@ void QOscServer::readyRead() { if ( type == 's' ) { QString s = toString( tmp ); value = s; - i += s.size(); + // string size plus one for the null terminator + i += s.size() + 1; } if ( type == 'i' ) { value = toInt32( tmp );