[haiku-commits] Re: haiku: hrev43547 - src/kits/interface

  • From: marcus overhagen <marcusoverhagen@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 22 Dec 2011 22:41:53 +0100

>  Since clamping the index for these methods could lead to confusing side 
> effects, we'll just avoid the clamping, and let things segfault when the 
> programmer goes out of bounds.

I agree that doing any clamping on invalid input is just wrong here
and needs to be removed.

However, if invalid parameters are expected as a frequent programming
error, it would
be much better to validate them and call debugger() on invalid values.

regards
Marcus

Other related posts: