added sprintf() to x86emu/debug.c
This commit is contained in:
@@ -352,7 +352,7 @@ static void doprnt(void (*addchar)(int), const char *sfmt, va_list ap)
|
||||
|
||||
static char *xstring, *xestring;
|
||||
|
||||
static void xaddchar(int c)
|
||||
void xaddchar(int c)
|
||||
{
|
||||
if (xestring == xstring)
|
||||
*xstring = '\0';
|
||||
|
||||
@@ -176,36 +176,10 @@ void x86emu_decode_printf2 (char *x, int y)
|
||||
{
|
||||
char temp[100], *p;
|
||||
|
||||
doprnt(xaddchar, x, y);
|
||||
#ifdef DBG_X86EMU
|
||||
{
|
||||
p = temp;
|
||||
while (x[0] != 0)
|
||||
{
|
||||
if (x[0] =='%' && x[1] =='d')
|
||||
{
|
||||
x += 2;
|
||||
Funcs_ltoa(p, y, 10);
|
||||
while (p[0] != 0)
|
||||
p++;
|
||||
}
|
||||
else if (x[0] == '%' && x[1] == 'x')
|
||||
{
|
||||
x += 2;
|
||||
*p++ = '0';
|
||||
*p++ = 'x';
|
||||
y &= 0xffff;
|
||||
Funcs_ltoa(p, y, 16);
|
||||
while (p[0] != 0)
|
||||
p++;
|
||||
}
|
||||
else
|
||||
*p++ = *x++;
|
||||
}
|
||||
*p = 0;
|
||||
sprintf(temp, x, y);
|
||||
strcpy(temp, &M.x86.decoded_buf[M.x86.enc_str_pos & 127]);
|
||||
M.x86.enc_str_pos += strlen(temp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user