From 13ecef54606d663bc326e0ec1a153dc23dda31a4 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 11 Nov 2017 11:02:11 +0100 Subject: [PATCH] update: fix display of installed version; ... curiously it was only broken on ARM_HARDWARE Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d6bc4e2e7b5291a98ad1d7007792fb56d5c104a5 Author: vanhofen Date: 2017-11-11 (Sat, 11 Nov 2017) Origin message was: ------------------ - update: fix display of installed version; ... curiously it was only broken on ARM_HARDWARE --- src/gui/update.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index f80ffc918..68303a7cc 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -218,10 +218,12 @@ bool CFlashUpdate::selectHttpImage(void) int curVer, newVer, newfound = 0; CConfigFile _configfile('\t'); - const char * versionString = (_configfile.loadConfig(TARGET_PREFIX "/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????"; + std::string versionString = "????????????????"; + if (_configfile.loadConfig(TARGET_PREFIX "/.version")) + versionString = _configfile.getString("version", "????????????????"); - CFlashVersionInfo curInfo(versionString); - printf("current flash-version: %s (%d) date %s (%ld)\n", versionString, curInfo.getVersion(), curInfo.getDate(), curInfo.getDateTime()); + CFlashVersionInfo curInfo(versionString.c_str()); + printf("current flash-version: %s (%d) date %s (%ld)\n", versionString.c_str(), curInfo.getVersion(), curInfo.getDate(), curInfo.getDateTime()); curVer = curInfo.getVersion(); httpTool.setStatusViewer(this);