Fix TN3270 out of bounds write