Skip to content

Commit

Permalink
AURORA: Allow named void variable in hasVariable()
Browse files Browse the repository at this point in the history
Doesn't make much sense, but doesn't hurt either.

Coverity issue 1038263.
  • Loading branch information
DrMcCoy committed Jun 26, 2013
1 parent 94766d7 commit f6d3398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aurora/nwscript/variablecontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool VariableContainer::hasVariable(const Common::UString &var) const {

Variable &VariableContainer::getVariable(const Common::UString &var, Type type) {
VariableMap::iterator v = _variables.find(var);
if ((v == _variables.end()) && (type != kTypeVoid)) {
if (v == _variables.end()) {
std::pair<VariableMap::iterator, bool> result;

result = _variables.insert(std::make_pair(var, Variable(type)));
Expand Down

0 comments on commit f6d3398

Please sign in to comment.