From ca7d4447de2c453958c9961fc3413514e8de245e Mon Sep 17 00:00:00 2001 From: "Julien \"_FrnchFrgg_\" RIVAUD" Date: Tue, 26 Jul 2016 09:52:42 +0200 Subject: 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. --- libs/ardour/luaproc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/ardour/luaproc.cc') 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 #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 ())); } } -- cgit v1.2.3