Skip to content

Commit 53affe8

Browse files
committed
compare first digit before forcing
1 parent ed4f777 commit 53affe8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/plugins.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,9 +1074,13 @@ struct StaticPluginLoader {
10741074
auto versionJ = json_object_get(rootJ, "version");
10751075
if (versionJ != nullptr)
10761076
oldVersion = json_string_value(versionJ);
1077+
d_stderr2("Loading plugin %s with version %s", p->slug.c_str(), oldVersion.c_str());
1078+
1079+
json_t* version = json_string(oldVersion.c_str());
1080+
if ( (int) oldVersion.at(0) < (int) APP_VERSION_MAJOR.at(0) )
1081+
// force ABI, we use static plugins so this doesnt matter as long as it builds
1082+
version = json_string(oldVersion.replace(0, 1, APP_VERSION_MAJOR).c_str());
10771083

1078-
// force ABI, we use static plugins so this doesnt matter as long as it builds
1079-
json_t* const version = json_string(oldVersion.replace(0, 1, APP_VERSION_MAJOR).c_str());
10801084
json_object_set(rootJ, "version", version);
10811085
json_decref(version);
10821086

0 commit comments

Comments
 (0)