From 8485eef361b0fee988c4207cc3d81b5a58933f50 Mon Sep 17 00:00:00 2001 From: Yerolling <2911328695@qq.com> Date: Tue, 24 May 2022 21:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86PrintState=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=B8=AD=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E6=9C=AA=E5=8A=A0=E7=BB=88=E6=AD=A2=E7=AC=A6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bus_io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bus_io.c b/src/bus_io.c index c6126fd..a491f6a 100644 --- a/src/bus_io.c +++ b/src/bus_io.c @@ -162,7 +162,10 @@ void PrintState(char *str) clockwise[count] = '0'; counterclockwise[count] = '0'; } //遍历轨道链表,将所有站点初始化为0,即:无任何请求; - + target[count] = '\0'; + clockwise[count] = '\0'; + counterclockwise[count] = '\0'; + bus_query_t *t = NULL; int i; for (t = queries; t != NULL; t = t->next_node)