mirror of https://github.com/cy384/ssheven.git
fix printing of 0 integer
This commit is contained in:
parent
9b319d7b77
commit
86054bae08
|
@ -114,6 +114,12 @@ void print_int(int d)
|
|||
char buffer[12] = {0};
|
||||
int i = 10;
|
||||
|
||||
if (d == 0)
|
||||
{
|
||||
buffer[0] = '0';
|
||||
i = -1;
|
||||
}
|
||||
|
||||
for (; d > 0; i--)
|
||||
{
|
||||
buffer[i] = itoc[d % 10];
|
||||
|
|
Loading…
Reference in New Issue