From 5abb845ce13a75a35131ac7842b603879b2ec82b Mon Sep 17 00:00:00 2001 From: sorgelig Date: Wed, 1 Apr 2020 22:02:17 +0800 Subject: [PATCH] arcade: fix the length parameter of part. --- support/arcade/romutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/arcade/romutils.cpp b/support/arcade/romutils.cpp index 3c4b6f9..0718481 100644 --- a/support/arcade/romutils.cpp +++ b/support/arcade/romutils.cpp @@ -197,7 +197,7 @@ static int rom_file(const char *name, uint32_t crc32, int start, int len, int ma static uint8_t buf[4096]; if (!FileOpenZip(&f, name, crc32)) return 0; if (start) FileSeek(&f, start, SEEK_SET); - unsigned long bytes2send = f.size; + unsigned long bytes2send = f.size - f.offset; if (len > 0 && len < (int)bytes2send) bytes2send = len; while (bytes2send)