From 067a0a44c737894950752a9e4708972954b46f29 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Thu, 30 Aug 2012 18:11:14 +0400 Subject: [PATCH] gui/channellist.cpp: fix p_requested_channels allocate size Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/25e4a396d7cb8096d81db2ca73a07fc5bfba5f7d Author: [CST] Focus Date: 2012-08-30 (Thu, 30 Aug 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 65c5286ba..078e5e467 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -186,17 +186,16 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to) } } else { t_channel_id *p_requested_channels; - int size_requested_channels = chanlist_size * sizeof(t_channel_id); - p_requested_channels = new t_channel_id[size_requested_channels]; + p_requested_channels = new t_channel_id[chanlist_size]; if (! p_requested_channels) { fprintf(stderr,"%s:%d allocation failed!\n", __FUNCTION__, __LINE__); return; } - for (uint32_t count = 0; count < chanlist_size; count++) { - p_requested_channels[count] = chanlist[count + from]->channel_id&0xFFFFFFFFFFFFULL; - } + for (uint32_t count = 0; count < chanlist_size; count++) + p_requested_channels[count] = chanlist[count + from]->channel_id; + CChannelEventList levents; - CEitManager::getInstance()->getChannelEvents(levents, (CNeutrinoApp::getInstance()->getMode()) != NeutrinoMessages::mode_radio, p_requested_channels, size_requested_channels); + CEitManager::getInstance()->getChannelEvents(levents, p_requested_channels, chanlist_size); for (uint32_t count=0; count < chanlist_size; count++) { chanlist[count]->currentEvent = CChannelEvent(); for (CChannelEventList::iterator e = levents.begin(); e != levents.end(); ++e) {