Make sure CurLine has a length of MAX_LINE (4096).

When using history the current line gets set to a length of the input rather then MAX_LINE causing out of index errors when trying to write anything after a history line had been selected.