浏览代码

* Fix std_in buffer getting truncated

Bryan Drewery 15 年之前
父节点
当前提交
5ecb808b9c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/debug.c

+ 1 - 1
src/debug.c

@@ -139,7 +139,7 @@ static void write_debug(bool fatal = 1)
     FILE *f = fopen(btfile, "w");
     FILE *f = fopen(btfile, "w");
 
 
     if (f) {
     if (f) {
-      strlcpy(std_in, "bt 100\nbt 100 full\ndetach\nquit\n", sizeof(stdin));
+      strlcpy(std_in, "bt 100\nbt 100 full\ndetach\nquit\n", sizeof(std_in));
       //simple_snprintf(stdin, sizeof(stdin), "detach\n");
       //simple_snprintf(stdin, sizeof(stdin), "detach\n");
       //simple_snprintf(stdin, sizeof(stdin), "q\n");
       //simple_snprintf(stdin, sizeof(stdin), "q\n");