From 68f48f38309a99efcdc59834a07d9fc01d7a7c95 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 8 Dec 2022 09:50:06 +0100 Subject: [PATCH] - removed bogus errno check from Dehacked parser. This checked errno without first confirming that there has been an error, it is also pointless because the value range check will automatically catch the error case as well. --- src/gamedata/d_dehacked.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gamedata/d_dehacked.cpp b/src/gamedata/d_dehacked.cpp index 5543a42df..235153616 100644 --- a/src/gamedata/d_dehacked.cpp +++ b/src/gamedata/d_dehacked.cpp @@ -1142,7 +1142,7 @@ static int PatchThing (int thingy) size_t linelen = strlen (Line1); // Supported value range is all valid representations of signed int and unsigned int. - if (errno == ERANGE || val < INT_MIN || val > UINT_MAX) + if (val < INT_MIN || val > UINT_MAX) { Printf("Bad numeric constant %s for %s\n", Line2, Line1); }