ncannasse 8 年之前
父节点
当前提交
180b5b9f63
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h2d/Console.hx

+ 1 - 1
h2d/Console.hx

@@ -175,7 +175,7 @@ class Console extends h2d.Sprite {
 		case Key.DOWN:
 			if(tf.text == curCmd) return;
 			if(logIndex == logs.length - 1) {
-				tf.text = curCmd;
+				tf.text = curCmd == null ? "" : curCmd;
 				tf.cursorIndex = tf.text.length;
 				logIndex = -1;
 				return;