Replace 0x30 by "0" for readability

This commit is contained in:
tosu 2023-03-17 04:05:25 +01:00
parent 1c4aaaf959
commit f93d4ace8d
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ void ft_putnbr(int nb)
} }
nb *= -1; nb *= -1;
} }
last_digit = nb % 10 + 0x30; last_digit = nb % 10 + '0';
if (nb > 9) if (nb > 9)
{ {
nb /= 10; nb /= 10;

View File

@ -23,7 +23,7 @@ void generate_outputs(char *output, int output_len, int max_len)
if (output_len == max_len) if (output_len == max_len)
{ {
write(1, output, output_len); write(1, output, output_len);
if (output[0] != 10 - max_len + 0x30) if (output[0] != 10 - max_len + '0')
write(1, ", ", 2); write(1, ", ", 2);
return ; return ;
} }