diff --git a/src/config.c b/src/config.c
index aad7db0f9..7db7cb040 100644
--- a/src/config.c
+++ b/src/config.c
@@ -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]);
}
diff --git a/src/device/serial.c b/src/device/serial.c
index da34fd212..817a1fede 100644
--- a/src/device/serial.c
+++ b/src/device/serial.c
@@ -12,11 +12,9 @@
*
*
*
- * Authors: Sarah Walker,
- * Miran Grca,
+ * Authors: Miran Grca,
* Fred N. van Kempen,
*
- * Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2017-2020 Fred N. van Kempen.
*/
@@ -742,7 +740,7 @@ serial_rcvr_d_empty_evt(void *priv)
{
serial_t *dev = (serial_t *) priv;
- dev->lsr = (dev->lsr & 0xfe) | !fifo_get_empty(dev->rcvr_fifo);
+ dev->lsr = (dev->lsr & 0xfe) | (fifo_get_empty(dev->rcvr_fifo) ? 0 : 1);
}
static void