I was trying to make a for loop count down backwards using this loop, but when it gets to zero, instead of realizing that decrementing will bring the number below zero, it tries to make the unsigned short (-1), which is actually 65535 as unsigned.
of course, this code produces an access violation because there is no elements 65535.
for(unsigned short i = n_elements - 1; i >= 0; i--)
{
array[i] = blah;
}