From 08f52c5a2903cda6da131f7c0c566589cedef167 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 14 Apr 2020 20:38:03 +0200 Subject: [PATCH] Changes to some font loading in video.c to fix Olivetti M24. --- src/video/video.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/video/video.c b/src/video/video.c index ddc1eefc9..5f3950bf7 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -935,15 +935,11 @@ loadfont(wchar_t *s, int format) case 1: /* PC200 */ for (d = 0; d < 4; d++) { /* There are 4 fonts in the ROM */ - for (c = 0; c < 256; c++) { /* 8x14 MDA in 8x16 cell */ - if (fread(&fontdatm[256*d + c][0], 1, 16, f) != 16) - fatal("loadfont(): Error reading 8x16 font in PC200 mode, c = %i\n", c); - } + for (c = 0; c < 256; c++) /* 8x14 MDA in 8x16 cell */ + fread(&fontdatm[256*d + c][0], 1, 16, f); for (c = 0; c < 256; c++) { /* 8x8 CGA in 8x16 cell */ - if (fread(&fontdat[256*d + c][0], 1, 8, f) != 8) - fatal("loadfont(): Error reading 8x8 font in PC200 mode, c = %i\n", c); - if (fseek(f, 8, SEEK_CUR) == -1) - fatal("loadfont(): Error seeking in PC200 mode, c = %i\n", c); + fread(&fontdat[256*d + c][0], 1, 8, f); + fseek(f, 8, SEEK_CUR); } } break;