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 );