From a57f04d7814034743d53b3d85d6448eec228aacb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 16 May 2025 11:36:12 +0200 Subject: csv: fix hang Introduced while removing calls to readLineInto(). --- csv/csv.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'csv/csv.cpp') diff --git a/csv/csv.cpp b/csv/csv.cpp index d899e11a..79841bea 100644 --- a/csv/csv.cpp +++ b/csv/csv.cpp @@ -73,8 +73,10 @@ bool getGameData(int id, unsigned char* table, QString& gamename) while (auto sz = file.readLine(buf, sizeof(buf))) { QString line = decoder.decode(QByteArrayView{buf, sz}); - chomp(line); + if (line.isEmpty()) + break; + chomp(line); if (line.isEmpty()) continue; -- cgit v1.2.3