Fix warning in clang 3.5 (-Wabsolute-value)

This commit is contained in:
Luchs
2015-04-01 17:42:20 +02:00
parent b46828e93e
commit 45fc872214

View File

@ -390,7 +390,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;
}