cast to char c
This commit is contained in:
2
printf.c
2
printf.c
@@ -38,7 +38,7 @@ int _printf(const char *format, ...)
|
|||||||
break;
|
break;
|
||||||
case 'c': /* add 1 byte and i++ */
|
case 'c': /* add 1 byte and i++ */
|
||||||
c = va_arg(args, int);
|
c = va_arg(args, int);
|
||||||
*(buffer + buff_idx + 1) = c;
|
*(buffer + buff_idx + 1) = (char) c;
|
||||||
BUFF_SIZE = _strlen(buffer);
|
BUFF_SIZE = _strlen(buffer);
|
||||||
buff_idx += 1;
|
buff_idx += 1;
|
||||||
fmt_idx += 2;
|
fmt_idx += 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user