From 782c5f8a34892c42b8b3dd420432de57eed21f26 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 23 Apr 2020 18:34:14 -0700 Subject: [PATCH] Fix parsing rare GFE status code of 0xFFFFFFFF --- app/backend/nvhttp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/backend/nvhttp.cpp b/app/backend/nvhttp.cpp index 3d683a54..a116d70a 100644 --- a/app/backend/nvhttp.cpp +++ b/app/backend/nvhttp.cpp @@ -296,7 +296,10 @@ NvHTTP::verifyResponseStatus(QString xml) { if (xmlReader.name() == "root") { - int statusCode = xmlReader.attributes().value("status_code").toInt(); + // Status code can be 0xFFFFFFFF in some rare cases on GFE 3.20.3, and + // QString::toInt() will fail in that case, so use QString::toUInt() + // and cast the result to an int instead. + int statusCode = (int)xmlReader.attributes().value("status_code").toUInt(); if (statusCode == 200) { // Successful