Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workspace/all/minarch/ma_cheats.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void Cheat_getPaths(char paths[CHEAT_MAX_PATHS][MAX_PATH], int* count) {
{
int i = 0;
char* ext;
char exts[128];
char exts[sizeof(core.extensions)];
if (core.extensions == NULL || strlen(core.extensions) >= sizeof(exts)) {
LOG_info("Invalid or too long core.extensions\n");
return;
Expand Down
2 changes: 1 addition & 1 deletion workspace/all/minarch/ma_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void Core_open(const char* core_path, const char* tag_name) {
Core_getName((char*)core_path, (char*)core.name);
sprintf((char*)core.version, "%s (%s)", info.library_name, info.library_version);
strcpy((char*)core.tag, tag_name);
strcpy((char*)core.extensions, info.valid_extensions);
snprintf((char*)core.extensions, sizeof(core.extensions), "%s", info.valid_extensions ? info.valid_extensions : "");

core.need_fullpath = info.need_fullpath;

Expand Down
2 changes: 1 addition & 1 deletion workspace/all/minarch/ma_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void Game_open(char* path) {
int supports_zip = 0;
int i = 0;
char* ext;
char exts[128];
char exts[sizeof(core.extensions)];
char* extensions[32];
strcpy(exts,core.extensions);
while ((ext=strtok(i?NULL:exts,"|"))) {
Expand Down
2 changes: 1 addition & 1 deletion workspace/all/minarch/ma_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct Core {
const char tag[8]; // eg. GBC
const char name[128]; // eg. gambatte
const char version[128]; // eg. Gambatte (v0.5.0-netlink 7e02df6)
const char extensions[128]; // eg. gb|gbc|dmg
const char extensions[256]; // eg. gb|gbc|dmg

const char config_dir[MAX_PATH]; // eg. /mnt/sdcard/.userdata/h700/GB-gambatte
const char states_dir[MAX_PATH]; // eg. /mnt/sdcard/.userdata/arm-480/GB-gambatte
Expand Down