Skip to content

Commit

Permalink
Cast to size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Nov 14, 2013
1 parent 512a800 commit 38eb244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cast.c
Expand Up @@ -1011,7 +1011,7 @@ Type *SliceExp::toStaticArrayType()
Expression *upr = this->upr->optimize(WANTvalue);
if (lwr->isConst() && upr->isConst())
{
size_t len = upr->toUInteger() - lwr->toUInteger();
size_t len = (size_t)(upr->toUInteger() - lwr->toUInteger());
return TypeSArray::makeType(loc, type->toBasetype()->nextOf(), len);
}
}
Expand Down

0 comments on commit 38eb244

Please sign in to comment.