Don't try to allocate a ridiculous 1025 bytes on the stack (which completely

explodes on CP/M).
This commit is contained in:
David Given 2020-02-05 23:05:33 +01:00
parent dea8e6f334
commit 53a3630d2c

View file

@ -162,7 +162,8 @@ int _doprnt(register const char* fmt, va_list ap)
int i, c, width, precision, zfill, flags, between_fill; int i, c, width, precision, zfill, flags, between_fill;
int nrchars = 0; int nrchars = 0;
const char* oldfmt; const char* oldfmt;
char *s1, buf[1025]; char *s1;
static char buf[16]; /* used to store rendered numbers */
while (c = *fmt++) while (c = *fmt++)
{ {