From 14e0be34291c789d611e8f4f15f891e4bbf27c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Parrino?= Date: Sat, 26 Oct 2024 12:08:17 -0300 Subject: [PATCH] Update ps1card.c --- source/ps1card.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ps1card.c b/source/ps1card.c index 27f56d5..790e64b 100644 --- a/source/ps1card.c +++ b/source/ps1card.c @@ -218,12 +218,13 @@ static void setPsvHeader(const char* saveFilename, uint32_t saveLength, FILE* fp psvSave[0x3C] = 1; psvSave[0x44] = 0x84; psvSave[0x49] = 2; - psvSave[0x5D] = 0x20; psvSave[0x60] = 3; psvSave[0x61] = 0x90; + saveLength = ES32(saveLength); memcpy(&psvSave[0x64], saveFilename, 20); memcpy(&psvSave[0x40], &saveLength, sizeof(uint32_t)); + memcpy(&psvSave[0x5C], &saveLength, sizeof(uint32_t)); fwrite(psvSave, 1, sizeof(psvSave), fp); return;