EPGCache - fixed swapped parameters in fread and fwrite
authorims <ims21@users.sourceforge.net>
Sat, 9 May 2015 20:05:23 +0000 (22:05 +0200)
committerpieterg <pieterg@users.sourceforge.net>
Mon, 11 May 2015 12:20:51 +0000 (14:20 +0200)
Signed-off-by: pieterg <pieterg@users.sourceforge.net>

lib/dvb/epgcache.cpp

index d42053c..5215bea 100644 (file)
@@ -1288,7 +1288,7 @@ void eEPGCache::load()
                                        if (event->n_crc)
                                        {
                                                event->crc_list = new uint32_t[event->n_crc];
-                                               fread( event->crc_list, event->n_crc, sizeof(uint32_t), f);
+                                               fread( event->crc_list, sizeof(uint32_t), event->n_crc, f);
                                        }
                                        eventData::CacheSize += sizeof(eventData) + event->n_crc * sizeof(uint32_t);
                                        item.byEvent[event->getEventID()] = event;
@@ -1419,7 +1419,7 @@ void eEPGCache::save()
                        fwrite( &time_it->second->type, sizeof(uint8_t), 1, f );
                        fwrite( &len, sizeof(uint8_t), 1, f);
                        fwrite( time_it->second->rawEITdata, 10, 1, f);
-                       fwrite( time_it->second->crc_list, time_it->second->n_crc, sizeof(uint32_t), f);
+                       fwrite( time_it->second->crc_list, sizeof(uint32_t), time_it->second->n_crc, f);
                        ++cnt;
                }
        }