Some small fixes.

This commit is contained in:
OBattler
2023-08-19 06:05:52 +02:00
parent 6c4a4be6be
commit 5b56f3a450
2 changed files with 6 additions and 8 deletions

View File

@@ -1348,13 +1348,13 @@ load_floppy_and_cdrom_drives(void)
p = ini_section_get_string(cat, temp, NULL);
if (p) {
if (path_abs(p)) {
if (strlen(p) > 511)
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511 "
if (strlen(p) > 255)
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 255 "
"(fdd_image_history[%i][%i])\n", c, i);
else
snprintf(fdd_image_history[c][i], 511, "%s", p);
snprintf(fdd_image_history[c][i], 255, "%s", p);
} else
snprintf(fdd_image_history[c][i], 511, "%s%$s%s", usr_path,
snprintf(fdd_image_history[c][i], 255, "%s%$s%s", usr_path,
path_get_slash(usr_path), p);
path_normalize(fdd_image_history[c][i]);
}