Merge pull request #249 from lluchs/clang-absolute-value

Fix warning in clang 3.5 (-Wabsolute-value)
This commit is contained in:
Bob Nystrom 2015-04-03 18:38:10 -07:00
commit 455196db81

View File

@ -396,7 +396,7 @@ static uint32_t calculateRange(WrenVM* vm, Value* args, ObjRange* range,
}
uint32_t to = (uint32_t)value;
*length = abs(from - to) + 1;
*length = abs((int)(from - to)) + 1;
*step = from < to ? 1 : -1;
return from;
}