From: <sag...@us...> - 2014-05-06 20:49:48
|
Revision: 4042 http://sourceforge.net/p/modplug/code/4042 Author: saga-games Date: 2014-05-06 20:49:41 +0000 (Tue, 06 May 2014) Log Message: ----------- [Fix] Plugin bridge: Don't crash (in release mode) when a plugin sends an opcode that isn't expected to have ptr != 0 (https://bugs.openmpt.org/view.php?id=519) [Imp] VST: When trying to load a plugin where both the 32-bit and 64-bit version are registered in OpenMPT, prefer the native version. [Mod] OpenMPT: Version is now 1.23.03.01 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-05 19:51:41 UTC (rev 4041) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-06 20:49:41 UTC (rev 4042) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 03 -#define VER_MINORMINOR 00 +#define VER_MINORMINOR 01 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/pluginBridge/Bridge.cpp =================================================================== --- trunk/OpenMPT/pluginBridge/Bridge.cpp 2014-05-05 19:51:41 UTC (rev 4041) +++ trunk/OpenMPT/pluginBridge/Bridge.cpp 2014-05-06 20:49:41 UTC (rev 4042) @@ -983,7 +983,10 @@ break; default: +#ifdef _DEBUG if(ptr != nullptr) __debugbreak(); +#endif + break; } if(ptrOut != 0) Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2014-05-05 19:51:41 UTC (rev 4041) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2014-05-06 20:49:41 UTC (rev 4042) @@ -479,7 +479,7 @@ VSTPluginLib *pFound = nullptr; // Find plugin in library - int match = 0; + int8 match = 0; // "Match quality" of found plugin. Higher value = better match. for(const_iterator p = begin(); p != end(); p++) { VSTPluginLib *plug = *p; @@ -490,15 +490,20 @@ if(matchID && matchName) { pFound = plug; - break; + if(plug->IsNative(false)) + { + break; + } + // If the plugin isn't native, first check if a native version can be found. + match = 3; } else if(matchID && match < 2) { + pFound = plug; match = 2; - pFound = plug; } else if(matchName && match < 1) { + pFound = plug; match = 1; - pFound = plug; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |