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