]> git.tdb.fi Git - libs/datafile.git/commitdiff
Fix an incorrect condition for throwing an exception
authorMikko Rasa <tdb@tdb.fi>
Wed, 30 Dec 2020 16:41:38 +0000 (18:41 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 30 Dec 2020 16:41:38 +0000 (18:41 +0200)
Null actions are allowed, so only throw if there was no match.

source/loader.cpp

index 51e22edf7a8e47c4ea1b02a3b1077d14e34f1f6e..6a4a8d845dee3642a9091d31fc847f067937b4e9 100644 (file)
@@ -229,7 +229,7 @@ LoaderAction *Loader::find_action(const StatementKey &key) const
                }
        }
 
                }
        }
 
-       if(!act)
+       if(!match)
                throw invalid_signature(key.keyword, key.signature);
 
        return act;
                throw invalid_signature(key.keyword, key.signature);
 
        return act;