Skip to content

Commit

Permalink
Update CLuaFunctionParser.h (#3097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenius97 authored Jul 3, 2023
1 parent 31deeb8 commit 55647f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shared/mods/deathmatch/logic/lua/CLuaFunctionParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ struct CLuaFunctionParserBase

// NOTE/TODO: Use C++20 `std::in_range` here instead
// For now this doesn't do all the safety checks, but this should be "good enough" [until we switch to C++20]
if constexpr (std::is_integral_v<T> && std::is_unsigned_v<T>)
if constexpr (std::is_integral_v<T> && std::is_unsigned_v<T> && number < 0)
{
SetError("positive number", "negative");

Expand Down

0 comments on commit 55647f4

Please sign in to comment.