fusee: cleanup and simplify emummc logic

This commit is contained in:
hexkyz
2019-06-23 18:50:20 +01:00
parent e62754ed56
commit 729447eab0
6 changed files with 35 additions and 124 deletions

View File

@@ -109,7 +109,7 @@ int emu_device_partition_read_data(device_partition_t *devpart, void *dst, uint6
/* Treat the path as a folder with each part inside. */
snprintf(target_path, sizeof(target_path) - 1, "%s/%02d", origin_path, target_part);
} else {
target_sector = sector;
/* If there are no parts, copy the origin path directly. */
strcpy(target_path, origin_path);
}
@@ -182,7 +182,7 @@ int emu_device_partition_write_data(device_partition_t *devpart, const void *src
/* Treat the path as a folder with each part inside. */
snprintf(target_path, sizeof(target_path) - 1, "%s/%02d", origin_path, target_part);
} else {
target_sector = sector;
/* If there are no parts, copy the origin path directly. */
strcpy(target_path, origin_path);
}