Added bufferSize checks to some MathUtils functions.
Added bufferSize checks to some MathUtils functions.

Couldn't escape the while loop in getWrappedIndex() because there were no colors in the renderer's sky palette.

afritz1/OpenTESArena