From 6241b3d6cbb63499b1425900c4696cbfff09e3ec Mon Sep 17 00:00:00 2001 From: Salanto Date: Sun, 10 Jan 2021 03:17:49 +0100 Subject: [PATCH] Fix spacing, Replace quint16 with quint32 in ::genRand() --- include/aoclient.h | 2 +- src/commands.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/aoclient.h b/include/aoclient.h index 9df70ea..bcd63f0 100644 --- a/include/aoclient.h +++ b/include/aoclient.h @@ -177,7 +177,7 @@ class AOClient : public QObject { // Command helper functions QStringList buildAreaList(int area_idx); - int genRand(int min, int max); + int genRand(int min, int max); // Command function global variables bool change_auth_started = false; diff --git a/src/commands.cpp b/src/commands.cpp index 9772eae..aa84f9f 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -418,7 +418,7 @@ int AOClient::genRand(int min, int max) { #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) qsrand(QDateTime::currentMSecsSinceEpoch()); - quint16 random_number = (qrand() % (max - min + 1)) + min; + quint32 random_number = (qrand() % (max - min + 1)) + min; return random_number; #else