Forced cost function to return a value >= 1.

This commit is contained in:
Guillaume Melquiond 2009-09-20 19:12:59 +00:00
parent fd19056bb5
commit dbd845c5e6

View file

@ -1378,7 +1378,7 @@ double lua_calculator::cost(const map_location &loc, double so_far) const
double cost = lua_tonumber(L, -1);
lua_pop(L, 2);
return cost;
return !(cost >= 1.) ? 1. : cost;
}
lua_calculator::~lua_calculator()