changeset 220:e08cb0158e81

...
author Chris Cannam
date Thu, 25 Jan 2007 15:26:15 +0000
parents c399785358c8
children 07a96a1931c0
files plugin/DSSIPluginFactory.cpp plugin/LADSPAPluginFactory.cpp
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/DSSIPluginFactory.cpp	Thu Jan 25 12:19:05 2007 +0000
+++ b/plugin/DSSIPluginFactory.cpp	Thu Jan 25 15:26:15 2007 +0000
@@ -217,13 +217,15 @@
         }
 
 #ifdef _WIN32
-        home = getenv("ProgramFiles");
-        if (!home) home = "C:\\Program Files";
+        char *pfiles = getenv("ProgramFiles");
+        if (!pfiles) pfiles = "C:\\Program Files";
+        {
         std::string::size_type f;
         while ((f = path.find("%ProgramFiles%")) != std::string::npos &&
                f < path.length()) {
             path.replace(f, 14, pfiles);
         }
+        }
 #endif
     }
 
--- a/plugin/LADSPAPluginFactory.cpp	Thu Jan 25 12:19:05 2007 +0000
+++ b/plugin/LADSPAPluginFactory.cpp	Thu Jan 25 15:26:15 2007 +0000
@@ -540,13 +540,15 @@
         }
 
 #ifdef _WIN32
-        home = getenv("ProgramFiles");
-        if (!home) home = "C:\\Program Files";
+        char *pfiles = getenv("ProgramFiles");
+        if (!pfiles) pfiles = "C:\\Program Files";
+        {
         std::string::size_type f;
         while ((f = path.find("%ProgramFiles%")) != std::string::npos &&
                f < path.length()) {
             path.replace(f, 14, pfiles);
         }
+        }
 #endif
     }