From c5b69772be6c56c1317d3e5d36a9e4aac9f92d62 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 21 Aug 2015 02:21:19 +0200 Subject: csv: use unsigned char in scanf --- csv/csv.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 csv/csv.cpp diff --git a/csv/csv.cpp b/csv/csv.cpp old mode 100644 new mode 100755 index e55b429c..4c754542 --- a/csv/csv.cpp +++ b/csv/csv.cpp @@ -122,14 +122,14 @@ void CSV::getGameData( const int id, unsigned char* table, QString& gamename) if (gameLine.count() > 6) { if (gameLine.at(6).compare( gameID, Qt::CaseInsensitive ) == 0) { QByteArray id = gameLine.at(7).toLatin1(); - unsigned int tmp[8]; - unsigned int fuzz[3]; + unsigned char tmp[8]; + unsigned char fuzz[3]; if (gameLine.at(3) == QString("V160")) { qDebug() << "no table"; } else if (sscanf(id.constData(), - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", fuzz + 2, fuzz + 0, tmp + 3, -- cgit v1.2.3