From b254b61998e02c9841b7338d399b80d8537bdf68 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 1 Oct 2008 20:20:45 +0000 Subject: [PATCH] oric.c: allow to load invalid files that img2oric used to generate. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2862 92316355-f0b4-4df1-b90c-862c8a59935f --- pipi/codec/oric.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipi/codec/oric.c b/pipi/codec/oric.c index bb9fe76..6ae5f25 100644 --- a/pipi/codec/oric.c +++ b/pipi/codec/oric.c @@ -173,10 +173,10 @@ static int read_screen(char const *name, uint8_t *screen) if(ch != 0x24) goto syntax_error; - /* Skip the header */ + /* Skip the header, ignoring the last byte’s value */ if(fgetc(fp) != 0x00 || fgetc(fp) != 0xff || fgetc(fp) != 0x80 || fgetc(fp) != 0x00 || fgetc(fp) != 0xbf || fgetc(fp) != 0x3f - || fgetc(fp) != 0xa0 || fgetc(fp) != 0x00 || fgetc(fp) != 0x00) + || fgetc(fp) != 0xa0 || fgetc(fp) != 0x00 || fgetc(fp) == EOF) goto syntax_error; /* Skip the file name, including trailing nul char */