summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rmd_load_cache.c5
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)
© All Rights Reserved