diff options
-rw-r--r-- | src/lua/lua_task.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 4f92bdb06..3ad1aa3db 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -2003,9 +2003,11 @@ lua_task_adjust_result (lua_State * L) } if (s) { - metric_res->score -= s->score; - s->score = weight; - metric_res->score += s->score; + if (!isnan (weight)) { + metric_res->score -= s->score; + s->score = weight; + metric_res->score += s->score; + } } else { return luaL_error (L, "symbol not found: %s", symbol_name); |