From cd9f5a0a5da79211080fb23239f3ea444c5c8e85 Mon Sep 17 00:00:00 2001 From: peabody124 Date: Wed, 8 Sep 2010 18:48:16 +0000 Subject: [PATCH] Ground/Logging: Fix bug overwriting timestamp. Thanks Cranphin. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1563 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/logging/loggingplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/src/plugins/logging/loggingplugin.cpp b/ground/src/plugins/logging/loggingplugin.cpp index 169cac00d..de8c30588 100644 --- a/ground/src/plugins/logging/loggingplugin.cpp +++ b/ground/src/plugins/logging/loggingplugin.cpp @@ -83,7 +83,7 @@ void LoggingThread::objectUpdated(UAVObject * obj) obj->pack(&buffer[8]); memcpy(buffer,&timeStamp,4); - memcpy(buffer,&objSize,4); + memcpy(&buffer[4],&objSize,4); QWriteLocker locker(&lock); qint64 written = logFile.write((char *) buffer,objSize+8);