On Sun, 9 Sep 2018, Fāng-ruì Sòng wrote: > > > - for (; fd; fd/=10) buf[--i] = '0' + fd%10; > > > + for (j=fd; i++, j /= 10; ); > > > > This is not correct as it only increments i once. A do-while loop would do > > the > > job better here. > > > > May I defend for myself? for (j=fd; i++, j /= 10; ); > i++ is in the loop condition so it will be incremented multiple times. Sorry, my mistake there (I misread the change). Alexander