From 1a99264ab5f2b47ec2651b616ec4432bc1c99c78 Mon Sep 17 00:00:00 2001 From: dimok789 Date: Mon, 14 Nov 2016 20:41:46 +0100 Subject: [PATCH] fix bug when launching rpx files --- sd_loader/src/entry.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sd_loader/src/entry.c b/sd_loader/src/entry.c index 8f62750..9493a46 100644 --- a/sd_loader/src/entry.c +++ b/sd_loader/src/entry.c @@ -272,8 +272,10 @@ static int LiWaitOneChunk(unsigned int * iRemainingBytes, const char *filename, if((mapOffset + blockSize) >= mem_area->size) { blockSize = mem_area->size - mapOffset; + //! this value is incremented later by blockSize, so set it to -blockSize for it to be 0 after copy + //! it makes smaller code then if(mapOffset == mem_area->size) after copy + mapOffset = -blockSize; mem_area = mem_area->next; - mapOffset = 0; } SC0x25_KernelCopyData(load_addressPhys + rpxBlockPos, address, blockSize);