From 266d43ef4ad98e21fe40307c6062e13361f9dc6e Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Fri, 26 Jul 2024 18:29:14 +0200 Subject: [PATCH] add another check for pops config --- core/popcorn/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/popcorn/main.c b/core/popcorn/main.c index 5c924b56..8eb9e449 100644 --- a/core/popcorn/main.c +++ b/core/popcorn/main.c @@ -430,7 +430,14 @@ static int myIoRead(int fd, unsigned char *buf, int size) } } - if (has_config && fd == pbp_fd && pos >= config_offset && pos+size <= config_offset+config_size){ + if (has_config && pos == config_offset){ + // trying to read POPS config + ret = MIN(size, config_size); + memcpy(buf, custom_config, ret); + goto exit; + } + + if (has_config /*&& fd == pbp_fd*/ && pos >= config_offset && pos+size <= config_offset+config_size){ // trying to read POPS config int relative_offset = pos - config_offset; memcpy(buf, (u8*)custom_config+relative_offset, size);