diff options
author | Robin Gareus <robin@gareus.org> | 2014-04-17 23:24:37 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-04-17 23:24:37 +0200 |
commit | 2e63b84a103213e7368184a697b51f0151d465b3 (patch) | |
tree | d5268b9364fccfb6ec70d96ee479891f569bb147 | |
parent | 3131ab8bbd9f57b6c59ff0a13460db634d5dafee (diff) |
account for MS version of std::isalnum() - fixes assert on UTF8
-rw-r--r-- | gtk2_ardour/plugin_selector.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index e39efe49a0..252accd523 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -311,8 +311,11 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte string::size_type pos = 0; /* stupid LADSPA creator strings */ - +#ifdef PLATFORM_WINDOWS + while (pos < creator.length() && creator[pos] > -2 && creator[pos] < 256 && (isalnum (creator[pos]) || isspace (creator[pos]))) ++pos; +#else while (pos < creator.length() && (isalnum (creator[pos]) || isspace (creator[pos]))) ++pos; +#endif creator = creator.substr (0, pos); newrow[plugin_columns.creator] = creator; @@ -681,7 +684,11 @@ PluginSelector::create_by_creator_menu (ARDOUR::PluginInfoList& all_plugs) /* stupid LADSPA creator strings */ string::size_type pos = 0; +#ifdef PLATFORM_WINDOWS + while (pos < creator.length() && creator[pos] > -2 && creator[pos] < 256 && (isalnum (creator[pos]) || isspace (creator[pos]))) ++pos; +#else while (pos < creator.length() && (isalnum (creator[pos]) || isspace (creator[pos]))) ++pos; +#endif creator = creator.substr (0, pos); SubmenuMap::iterator x; |