Fix logic for i infinal loop

thanks to this I had learned about dprintf and breakpoints
This commit is contained in:
Ivan Tham 2016-08-05 17:54:38 +08:00
parent 8be5483b6a
commit aa718fd83a

2
spt.c
View File

@ -135,7 +135,7 @@ run:
for (timecount = 0; timecount < timers[i].tmr; timecount += inc) for (timecount = 0; timecount < timers[i].tmr; timecount += inc)
sleep(1); sleep(1);
i = (i < LEN(timers)) ? i+1 : 0; /* i infinal loop */ if (++i >= LEN(timers)) i = 0; /* i infinal loop */
goto run; goto run;
return 0; return 0;