Arduino restarts problem
int m = 0;
...
    drawNo[m] = (char)keys;
...
    ++m;


No other references to m in your code. Therefore m keeps increasing and you are writing outside the bounds of the array drawNo, corrupting memory.