diff --git a/code/botlib/be_ai_chat.cpp b/code/botlib/be_ai_chat.cpp index 8adfbb9..1e9a6b2 100644 --- a/code/botlib/be_ai_chat.cpp +++ b/code/botlib/be_ai_chat.cpp @@ -1159,7 +1159,7 @@ bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken) { if (token.type == TT_NUMBER && (token.subtype & TT_INTEGER)) { - if (token.intvalue < 0 || token.intvalue >= MAX_MATCHVARIABLES) + if (token.intvalue >= MAX_MATCHVARIABLES) { SourceError(source, "can't have more than %d match variables\n", MAX_MATCHVARIABLES); FreeSource(source); diff --git a/code/client/cl_download.cpp b/code/client/cl_download.cpp index 69f6df1..f3fc8ba 100644 --- a/code/client/cl_download.cpp +++ b/code/client/cl_download.cpp @@ -1127,8 +1127,7 @@ void CL_MapDownload_Cancel() // negative if nothing's going on static float CL_MapDownload_Progress() { - if (!CL_MapDownload_Active() || !cl_mapDL.fromCommand || - cl_mapDL.bytesTotal < 1 || cl_mapDL.bytesDownloaded < 0) + if (!CL_MapDownload_Active() || !cl_mapDL.fromCommand || cl_mapDL.bytesTotal < 1) return -1; const uint64_t t = (uint64_t)cl_mapDL.bytesTotal; @@ -1143,8 +1142,7 @@ static float CL_MapDownload_Progress() // bytes/s, negative if nothing's going on static int CL_MapDownload_Speed() { - if (!CL_MapDownload_Active() || !cl_mapDL.fromCommand || - cl_mapDL.bytesTotal < 1 || cl_mapDL.bytesDownloaded < 0) + if (!CL_MapDownload_Active() || !cl_mapDL.fromCommand || cl_mapDL.bytesTotal < 1) return -1; const int startMS = cl_mapDL.startTimeMS;