From d96c1747035a90e077eae905ed5838a388cac68c Mon Sep 17 00:00:00 2001 From: Yerolling <2911328695@qq.com> Date: Tue, 24 May 2022 21:22:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86PrintState=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=B8=AD=E7=9A=84=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bus_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bus_io.c b/src/bus_io.c index ab623a8..c6126fd 100644 --- a/src/bus_io.c +++ b/src/bus_io.c @@ -151,11 +151,11 @@ void PrintState(char *str) { memset(str, 0, 150); - int count, flag=1; //flag用于标记,为使下面第一个循环能够进入 + int count, flag = 1; //flag用于标记,为使下面第一个循环能够进入 rail_node_t *p = NULL; char target[25], clockwise[25], counterclockwise[25]; - for (count = 0, p = rails; flag==1 || p != rails; p = p->next_node, count++) + for (count = 0, p = rails; flag == 1 || p != rails; p = p->next_node, count++) { flag=0; target[count] = '0';