Merge pull request #32 from devnexen/wrong_type_checking

Wrong comparison between pointers and integral type.
This commit is contained in:
Amy Ackermann
2018-07-30 09:16:02 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1386,7 +1386,7 @@ void passSettings(scripts::Manager* man) {
auto& modules = man->modules;
for(auto it = modules.begin(); it != modules.end(); ++it) {
scripts::Module& mod = *it->second;
if(mod.callbacks[scripts::SC_game_settings] > 0) {
if(mod.callbacks[scripts::SC_game_settings] != nullptr) {
game_settings.rewind();
scripts::Call cl = mod.call(scripts::SC_game_settings);
cl.push(&game_settings);
+1 -1
View File
@@ -1495,7 +1495,7 @@ MultiCall Manager::call(ScriptCallback cb) {
for(auto it = modules.begin(), end = modules.end(); it != end; ++it) {
Module& mod = *it->second;
if(mod.callbacks[cb] > 0)
if(mod.callbacks[cb] != nullptr)
calls.calls.push_back(mod.call(cb));
}