case 'g': case 'G':
ptmp += sprintf(ptmp, tmp2, (double)psxMu32(sp + n * 4)); n++; break;
case 'p':
- case 'i':
+ case 'i': case 'u':
case 'd': case 'D':
case 'o': case 'O':
case 'x': case 'X':
if ((*ptr & 0xF0) != 0x50) continue; \
ptr+= 0xa; \
if (pfile[0] == 0) { \
- strcpy(dir->name, ptr); \
+ strncpy(dir->name, ptr, sizeof(dir->name)); \
+ dir->name[sizeof(dir->name) - 1] = '\0'; \
} else for (i=0; i<20; i++) { \
if (pfile[i] == ptr[i]) { \
dir->name[i] = ptr[i]; \