fix restrict warning

This commit is contained in:
diamant3
2022-10-14 22:17:02 +08:00
parent 5d72bbc53e
commit 332dd434f1

View File

@@ -251,8 +251,9 @@ void pspDebugKbInit(char* str) {
break;
case 1: // Space
if (strlen(str) < PSP_DEBUG_KB_MAXLEN) {
snprintf(str, strlen(str)+2, "%s ", str);
pspDebugKbDrawString(str);
char out[PSP_DEBUG_KB_MAXLEN] = {0};
snprintf(out, strlen(str), "%s ", str);
pspDebugKbDrawString(out);
}
break;
case 2: // Back
@@ -272,8 +273,9 @@ void pspDebugKbInit(char* str) {
};
} else {
if (strlen(str) < PSP_DEBUG_KB_MAXLEN) {
snprintf(str, strlen(str)+2, "%s%c", str, charTable[row][col]);
pspDebugKbDrawString(str);
char out[PSP_DEBUG_KB_MAXLEN] = {0};
snprintf(out, strlen(str), "%s%c", str, charTable[row][col]);
pspDebugKbDrawString(out);
}
}
}