File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1069,18 +1069,17 @@ struct StaticPluginLoader {
10691069 return ;
10701070 }
10711071
1072- std::string version = " 0.0.0" ;
1073- json_t * versionJ = json_object_get (rootJ, " version" );
1074- if (versionJ)
1072+ std::string version;
1073+ if (json_t * const versionJ = json_object_get (rootJ, " version" ))
10751074 version = json_string_value (versionJ);
10761075
10771076 if (!string::startsWith (version, APP_VERSION_MAJOR + " ." ))
1077+ {
10781078 // force ABI, we use static plugins so this doesnt matter as long as it builds
1079- version = version.replace (0 , 1 , APP_VERSION_MAJOR).c_str ();
1080-
1081- json_t * json_version = json_string (version.c_str ());
1082- json_object_set (rootJ, " version" , json_version);
1083- json_decref (json_version);
1079+ json_t * json_version = json_string ((APP_VERSION_MAJOR + " .0" ).c_str ());
1080+ json_object_set (rootJ, " version" , json_version);
1081+ json_decref (json_version);
1082+ }
10841083
10851084 // Load manifest
10861085 p->fromJson (rootJ);
You can’t perform that action at this time.
0 commit comments