| diff --git a/plugins/plugins.cpp b/plugins/plugins.cpp
|
| index 019db5f..450b103 100644
|
| --- a/plugins/plugins.cpp
|
| +++ b/plugins/plugins.cpp
|
| @@ -1069,10 +1069,20 @@ struct StaticPluginLoader {
|
| return;
|
| }
|
|
|
| - // force ABI, we use static plugins so this doesnt matter as long as it builds
|
| - json_t* const version = json_string((APP_VERSION_MAJOR + ".0").c_str());
|
| - json_object_set(rootJ, "version", version);
|
| - json_decref(version);
|
| + std::string version = "0.0.0" ;
|
| +
|
| + json_t* versionJ = json_object_get(rootJ, "version");
|
| + if (versionJ != nullptr)
|
| + version = json_string_value(versionJ);
|
| +
|
| + if (!string::startsWith(version, APP_VERSION_MAJOR + "."))
|
| + // force ABI, we use static plugins so this doesnt matter as long as it builds
|
| + version = version.replace(0, 1, APP_VERSION_MAJOR).c_str();
|
| +
|
| + json_t* json_version = json_string(version.c_str());
|
| +
|
| + json_object_set(rootJ, "version", json_version);
|
| + json_decref(json_version);
|
|
|
| // Load manifest
|
| p->fromJson(rootJ);
|