Fix parsing rare GFE status code of 0xFFFFFFFF

This commit is contained in:
Cameron Gutman 2020-04-23 18:34:14 -07:00
parent d6b5c5f63e
commit 782c5f8a34

View file

@ -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