29.05.2012, 10:03
Straight forward example, bugs in your code will be harder to find than this.
The first place i look now
after spending hours trying to find a bug in my code
pawn Код:
new random_array[ 10 ];//array with 10 slots
foo( )
{
for( new i; i < 20; ++i )//loop through 20 slots
{
if( i > 10 )//array is now above top index
{
random_array[ i ] = 5;//runtime error (out of bounds) causes undefined behaviour
}
}
}
Quote:
I'd suggest you look there more - that's one of the most common bugs I see people asking about.
|
![Wink](images/smilies/wink.png)
![Sad](images/smilies/sad.gif)