Authored by: cjk fossman on Friday, August 10 2012 @ 03:51 PM EDT |
I'm not sure you can count on a program to crash if you
provide an invalid array index. I think if you're only
trying to read from the array and the bad memory address is
within the range allocated to the program you will just get
extremely strange results which may or may not lead to a
crash later on.
Debugging a problem like this could be a really hairy deal.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Friday, August 10 2012 @ 04:29 PM EDT |
But that's not the question, is it? The question is does it make a difference
that a programmer or lawyer could see?
[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Friday, August 10 2012 @ 05:54 PM EDT |
You wouldn't have used anything like rangeCheck(), if there wasn't a likelihood
that values could be out of range. If the user is allowed to enter a value you
test that it is within range or let the program crash.
[ Reply to This | Parent | # ]
|
|