getEnigmaVersionString() returns a pointer to an invalid memory location, as std...
authorAlex Revetchi <alex.revetchi@gmail.com>
Tue, 15 Oct 2013 20:57:47 +0000 (20:57 +0000)
committerpieterg <pieterg@users.sourceforge.net>
Wed, 16 Oct 2013 17:58:11 +0000 (19:58 +0200)
main/enigma.cpp
main/version_info.cpp
main/version_info.h

index cb11734..8a1547c 100644 (file)
@@ -313,9 +313,7 @@ void runMainloop()
 
 const char *getEnigmaVersionString()
 {
-       std::string date = enigma2_date;
-       std::string branch = enigma2_branch;
-       return std::string(date + '-' + branch).c_str();
+       return enigma2_version;
 }
 
 const char *getBoxType()
index f639eb8..5dcdbd7 100644 (file)
@@ -16,3 +16,4 @@ const char *enigma2_branch = ENIGMA2_BRANCH;
 #endif
 const char *enigma2_rev = ENIGMA2_REV;
 
+const char *enigma2_version = (ENIGMA2_COMMIT_DATE "-" ENIGMA2_BRANCH);
index f93cf01..63187e1 100644 (file)
@@ -4,5 +4,6 @@
 extern const char *enigma2_date;
 extern const char *enigma2_branch;
 extern const char *enigma2_rev;
+extern const char *enigma2_version;
 
 #endif