|
@richgel999 | |||||
|
At the very last minute, the Halo Wars 1 (Xbox 360) developers changed the custom std::vector container equivalent (likely used in thousands of places in the code) to do range checking on *all* operator[]'s. This shipped.
|
||||||
|
||||||
|
Richard Geldreich
@richgel999
|
28. sij |
|
So *every* access to our dynamic arrays was range checked. I wrote the containers and didn't think this would fly, but it did. (I didn't make the range check change.)
|
||
|
|
||
|
Richard Geldreich
@richgel999
|
28. sij |
|
There were some hard to find bugs near the end, and it was better to have deterministic behavior (just return the first or last element on invalid array indices) vs. going wild and accessing uninitialized/random memory.
|
||
|
|
||