diff options
author | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-07-26 09:52:42 +0200 |
---|---|---|
committer | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-07-26 09:52:42 +0200 |
commit | ca7d4447de2c453958c9961fc3413514e8de245e (patch) | |
tree | 42ed79616ece14489597652d132cc89a82d7b2d9 /libs/ardour/luaproc.cc | |
parent | c71cc6fe5b2ded2ff7dce36999e917f707b8e939 (diff) |
Add missing locale guard for luadsp preset loading
That caused truncation of parameters to int when the decimal separator
is not a period in the user's locale.
Diffstat (limited to 'libs/ardour/luaproc.cc')
-rw-r--r-- | libs/ardour/luaproc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc index 8ce1c75a19..c65afa86fe 100644 --- a/libs/ardour/luaproc.cc +++ b/libs/ardour/luaproc.cc @@ -22,7 +22,7 @@ #include <glibmm/fileutils.h> #include "pbd/gstdio_compat.h" - +#include "pbd/locale_guard.h" #include "pbd/pthread_utils.h" #include "ardour/audio_buffer.h" @@ -1214,6 +1214,7 @@ LuaProc::load_preset (PresetRecord r) XMLProperty const * value = (*j)->property (X_("value")); assert (index); assert (value); + LocaleGuard lg; set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ())); } } |