summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-25 13:06:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-25 13:06:58 +0200
commitd586a886d55ffb6aa3d6b0f56373ce0e8ea2ad59 (patch)
treee622cf07176b8a5c766727740a1544287a089311
parent51a44f199be138b71aa1045fc2ca0e5db6b72e78 (diff)
Zero table first, in case unknown game connects
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.cpp3
1 files changed, 2 insertions, 1 deletions
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",