mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy
This commit is contained in:
1 parent
c02634c161
commit
6945deec01
39 files changed
+170
-193
No files matched your search
@@ -32,11 +32,11 @@ public:
|
||||
u32 GetLR() override { return ctx.r[MIPS_REG_RA]; }
|
||||
void SetPC(u32 _pc) override { ctx.pc = _pc; }
|
||||
|
||||
void PrintRegValue(int cat, int index, char *out) override {
|
||||
void PrintRegValue(int cat, int index, char *out, size_t outSize) override {
|
||||
switch (cat) {
|
||||
case 0: sprintf(out, "%08X", ctx.r[index]); break;
|
||||
case 1: sprintf(out, "%f", ctx.f[index]); break;
|
||||
case 2: sprintf(out, "N/A"); break;
|
||||
case 0: snprintf(out, outSize, "%08X", ctx.r[index]); break;
|
||||
case 1: snprintf(out, outSize, "%f", ctx.f[index]); break;
|
||||
case 2: snprintf(out, outSize, "N/A"); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user