CImageInfo: expand fallback to get readable version string

Evaluation of one char could be not enough to get a right result.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 60bf6d7194
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-11-18 (Sat, 18 Nov 2017)



------------------
This commit was generated by Migit
This commit is contained in:
2017-11-18 16:17:38 +01:00
parent 77f402ea73
commit c7ed4da290

View File

@@ -281,7 +281,14 @@ void CImageInfo::InitInfoData()
#ifdef IMAGE_VERSION
version_string = IMAGE_VERSION;
#else
if (isdigit(version_string[0])){
bool is_version_code = true;
for (size_t i=0; i<version_string.size(); i++){
if (!isdigit(version_string[i])){
is_version_code = false;
break;
}
}
if (is_version_code && version_string.size() == 16){
static CFlashVersionInfo versionInfo(version_string.c_str());
version_string = versionInfo.getReleaseCycle();
version_string += " ";