I've changed the type to uint and added a cast to size_t at the cast.