]> granicus.if.org Git - pdns/commitdiff
silence a luawrapper warning. Hope I got it right.
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 17 Dec 2015 10:32:50 +0000 (11:32 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 17 Dec 2015 10:32:50 +0000 (11:32 +0100)
ext/luawrapper/include/LuaContext.hpp

index 0794b2e81fc43dae217f3b1a7ded6fc880e50b60..f247eef7a8582c61ef08f2d783d105211444cba2 100644 (file)
@@ -2500,7 +2500,7 @@ struct LuaContext::Reader<
     static auto read(lua_State* state, int index)
         -> boost::optional<TType>
     {
-        if (!lua_isnumber(state, index) != 0 || fmod(lua_tonumber(state, index), 1.) != 0)
+        if (!lua_isnumber(state, index) || fmod(lua_tonumber(state, index), 1.) != 0)
             return boost::none;
         return static_cast<TType>(lua_tointeger(state, index));
     }