Thank you to n.m, there was an off by one error in my code which led to some nasty buffer over flow issues. I was decrementing from 9 in an array of size 9. Array index's start a 0, meaning the end of the index was 8. Indexing 9 was out of the array's allocated memory, which means I was assigning memory to a random location outside of the array, which I suppose is where my incrementing variables were.