8 ms·
> The correct fix is to cast the input to unsigned, I think. I think the correct fix is rather to check the input (e.g. assert()). What you suggest means reint
by jstimpfle 7y ago
> The correct fix is to cast the input to unsigned, I think.
I think the correct fix is rather to check the input (e.g. assert()). What you suggest means reinterpreting what the caller wanted, and that leads to nasty surprises down the road.