diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-04-17 11:00:33 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-04-17 11:00:33 -0400 |
commit | 76b28e7ff22a5829da275e29e26faac404a107ae (patch) | |
tree | 5857a72c1efae57e7f6d63f31762fefcce5c9b9a /gtk2_ardour/bundle_env_mingw.cc | |
parent | dff83c77cf1e0aa397cafbf7bca705eb3d1800e5 (diff) |
fix novice-level mistake that causes localedir to point to random, reusable (typically stack) memory
Diffstat (limited to 'gtk2_ardour/bundle_env_mingw.cc')
-rw-r--r-- | gtk2_ardour/bundle_env_mingw.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/bundle_env_mingw.cc b/gtk2_ardour/bundle_env_mingw.cc index 312d56def7..e97bc0bd99 100644 --- a/gtk2_ardour/bundle_env_mingw.cc +++ b/gtk2_ardour/bundle_env_mingw.cc @@ -18,6 +18,7 @@ */ #include <stdlib.h> +#inc;ude <string> #include "bundle_env.h" #include "i18n.h" @@ -84,7 +85,7 @@ get_install_path () void -fixup_bundle_environment (int, char* [], const char** localedir) +fixup_bundle_environment (int, char* [], string & localedir) { EnvironmentalProtectionAgency::set_global_epa (new EnvironmentalProtectionAgency (true)); /* what to do ? */ @@ -103,7 +104,7 @@ fixup_bundle_environment (int, char* [], const char** localedir) Glib::setenv ("GTK_LOCALEDIR", path, true); // and return the same path to our caller - (*localedir) = strdup (path.c_str()); + localedir = path; } const char *cstr; |