Hello there, ---------------------------------------- > But my point remains to the original poster: a patch > without justification is unlikely to be applied. Document WHY you think > the existing code is a bug, not just HOW to fix it, for your patch to be > usefully considered.
Standard software engineering practice is to look before leaping. This means always check the array index before use. The static analyser implements that standard practice. The code in question, independent of whether it works ok or not, does it's work in a non-standard way when the standard way is easy to achieve and has some possible benefits for robustness, as well as being easier on the eye to the experienced code reviewer. Anyone experienced looking at the code will always need to examine it more closely to find out why it's a good idea in this case to use an array index and *then* sanity check it's value. Regards David Binderman