Arduino sketch behaves differently depending on version of Arduino IDE I am assisting some friends on an Arduino Uno project, and we've noticed that when using some earlier versions of the Arduino IDE (In this case 1.0.5), the sketch behaves as desired. However, when using 1.6.5, the program behaves differently. The sketch in question is here:

https://github.com/CymaSpace/Programs---Sketches/tree/master/Tim%20Gorbunov/a3%20with%20monosetting/a3

I have noticed that when enabling verbose compilation output, the size of the compiled binary is different between the two different IDE versions. There are also some warnings in the older IDE that are not present in the newer version. There is at least one other version before 1.6.5 that is behaving the same way as 1.0.5 (it's a later version but at the moment I don't know which, I will see if I can find out and post it here later).

Any idea why the two sketches might be behaving differently and how to go about troubleshooting the problem? This occurred on both a windows and mac computer. Thanks!
There are also some warnings in the older IDE that are not present in
  the newer version.


It is a huge mistake to disregards those warnings, especially:


  warning: array subscript is above array bounds


You declared an array int useColor[2]. Its length is 2 and its indices
can be either 0 or 1. Yet you are using useColor[2], which is out of
bounds and likely to corrupt memory.

From the language point of view, this is called undefined behavior,
which means that anything can happen. In particular, it could very
well happen that the program behaves as you expect... which seems to be
the case with IDE 1.0.5. Simply changing the compiler version, or event
the compiler settings, can change the behavior.