From dbf3cb899286c6ae7a6cca82b9b77fbdae6d1459 Mon Sep 17 00:00:00 2001 From: svenhoefer 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 Signed-off-by: Thilo Graf --- 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 c5314cf66..8db1a3ba3 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -202,10 +202,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);