Skip to content

Commit

Permalink
add another check for pops config
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Jul 26, 2024
1 parent e55bbf9 commit 266d43e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/popcorn/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 266d43e

Please sign in to comment.