From 9e6faf16bfb749c15738e112d78df1b73d55d27f Mon Sep 17 00:00:00 2001 From: Yerolling <2911328695@qq.com> Date: Tue, 24 May 2022 21:20:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86PrintState=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bus_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bus_io.c b/src/bus_io.c index d17ffcc..ab623a8 100644 --- a/src/bus_io.c +++ b/src/bus_io.c @@ -155,7 +155,7 @@ void PrintState(char *str) rail_node_t *p = NULL; char target[25], clockwise[25], counterclockwise[25]; - for (count = 0, p = rails; flag==1 || p != NULL; p = p->next_node, count++) + for (count = 0, p = rails; flag==1 || p != rails; p = p->next_node, count++) { flag=0; target[count] = '0';