diff options
-rw-r--r-- | src/rmd_load_cache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rmd_load_cache.c b/src/rmd_load_cache.c index 4ad1741..303cc3b 100644 --- a/src/rmd_load_cache.c +++ b/src/rmd_load_cache.c @@ -153,7 +153,10 @@ static int rmdReadFrame(CachedFrame *frame, CacheFile *icf) static int read_header(FrameHeader *fheader, CacheFile *icf) { - return rmdCacheFileRead(icf, fheader, sizeof(FrameHeader)) == sizeof(FrameHeader); + if (!(rmdCacheFileRead(icf, fheader, sizeof(FrameHeader)) == sizeof(FrameHeader))) + return 0; + + return !strncmp(fheader->frame_prefix, "FRAM", 4); } void *rmdLoadCache(ProgData *pdata) |