From 7a7fb6f74d089c6437f8ce526d0c21e960352bc5 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 9 Dec 2010 14:28:07 +0000 Subject: [PATCH] reset str buffer git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@936 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/78ff65f8a661bf612f31e3701af938a2f95c2066 Author: Jacek Jendrzej Date: 2010-12-09 (Thu, 09 Dec 2010) ------------------ This commit was generated by Migit --- src/gui/cam_menu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 7692a1219..4957c3c84 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -107,8 +107,8 @@ int CCAMMenuHandler::exec(CMenuTarget* parent, const std::string &actionkey) int CCAMMenuHandler::doMainMenu() { int ret, cnt; - char name1[255]; - char str1[255]; + char name1[255]={0}; + char str1[255]={0}; CMenuWidget* cammenu = new CMenuWidget(LOCALE_CI_SETTINGS, NEUTRINO_ICON_SETTINGS); cammenu->addItem( GenericMenuBack ); @@ -133,10 +133,12 @@ int CCAMMenuHandler::doMainMenu() cammenu->addItem(new CMenuForwarderNonLocalized(name1, true, NULL, this, tmp, CRCInput::RC_1 + cnt++)); snprintf(tmp, sizeof(tmp), "ca_ci_reset%d", i); cammenu->addItem(new CMenuForwarder(LOCALE_CI_RESET, true, NULL, this, tmp)); + memset(name1,0,sizeof(name1)); } else { snprintf(str1, sizeof(str1), "%s %d", g_Locale->getText(LOCALE_CI_EMPTY), i); tempMenu = new CMenuWidget(str1, NEUTRINO_ICON_SETTINGS); cammenu->addItem(new CMenuForwarderNonLocalized(str1, false, NULL, tempMenu)); + memset(str1,0,sizeof(str1)); } if (i < (CiSlots - 1)) cammenu->addItem( GenericMenuSeparatorLine ); @@ -161,11 +163,13 @@ int CCAMMenuHandler::doMainMenu() #if 0 // FIXME not implemented yet snprintf(tmp, sizeof(tmp), "ca_sc_reset%d", i); cammenu->addItem(new CMenuForwarder(LOCALE_SC_RESET, true, NULL, this, tmp)); + memset(name1,0,sizeof(name1)); #endif } else { snprintf(str1, sizeof(str1), "%s %d", g_Locale->getText(LOCALE_SC_EMPTY), i); tempMenu = new CMenuWidget(str1, NEUTRINO_ICON_SETTINGS); cammenu->addItem(new CMenuForwarderNonLocalized(str1, false, NULL, tempMenu)); + memset(str1,0,sizeof(str1)); } if (i < (ScNum - 1)) cammenu->addItem( GenericMenuSeparatorLine );