From 5e60b6446978e63d25d3b8ca9d26384d303ddea0 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 1 Sep 2013 14:35:35 +0200 Subject: [PATCH] gui/scan_setup:fix override gotoXXLongitude & gotoXXLatitude with uninitialized zapit_lat or zapit_long --- src/gui/scan_setup.cpp | 6 ++++-- src/neutrino.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index dfef5ad64..5a4e850a2 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -1389,8 +1389,10 @@ void CScanSetup::saveScanSetup() dprintf(DEBUG_NORMAL, "error while saving scan-settings!\n"); //CServiceManager::getInstance()->SaveMotorPositions(); - zapitCfg.gotoXXLatitude = strtod(zapit_lat, NULL); - zapitCfg.gotoXXLongitude = strtod(zapit_long, NULL); + if(zapit_lat[0] != '#')//check if var ok + zapitCfg.gotoXXLatitude = strtod(zapit_lat, NULL); + if(zapit_long[0] != '#')//check if var ok + zapitCfg.gotoXXLongitude = strtod(zapit_long, NULL); CZapit::getInstance()->SetConfig(&zapitCfg); CFEManager::getInstance()->saveSettings(true); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index cc0c652d6..9da507760 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -128,8 +128,8 @@ bool has_hdd; CInfoClock *InfoClock; int allow_flash = 1; Zapit_config zapitCfg; -char zapit_lat[20]; -char zapit_long[20]; +char zapit_lat[20]="#"; +char zapit_long[20]="#"; bool autoshift = false; uint32_t scrambled_timer; t_channel_id standby_channel_id;