From d586a886d55ffb6aa3d6b0f56373ce0e8ea2ad59 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 25 Apr 2013 13:06:58 +0200 Subject: Zero table first, in case unknown game connects --- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ftnoir_protocol_ft/ftnoir_protocol_ft.cpp') diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 503961fa..9b998a3c 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -95,6 +95,8 @@ void FTNoIR_Protocol::Initialize() // Read the game-data from CSV // void FTNoIR_Protocol::getGameData( QString gameID, bool& tirviews, bool& dummy){ + /* zero table first, in case unknown game is connecting */ + memset(pMemData->table, 0, 8); QStringList gameLine; qDebug() << "getGameData, ID = " << gameID; @@ -129,7 +131,6 @@ void FTNoIR_Protocol::getGameData( QString gameID, bool& tirviews, bool& dummy){ if (gameLine.at(3) == QString("V160")) { qDebug() << "no table"; - memset(pMemData->table, 0, 8); } else if (sscanf(id.constData(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", -- cgit v1.2.3