From 09a891921385287519be8dbd01da602630cfe406 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 26 Nov 2013 21:45:02 -0500 Subject: [PATCH] InstallationLocations: Add missing static specifiers. - Fixes a crash in find_paths() due to the InstallationLocations object getting overwritten. Thanks to Chris Roberts for reporting. --- src/system/libroot/os/find_paths.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/libroot/os/find_paths.cpp b/src/system/libroot/os/find_paths.cpp index 6b8cd875df..bfc02009b3 100644 --- a/src/system/libroot/os/find_paths.cpp +++ b/src/system/libroot/os/find_paths.cpp @@ -87,8 +87,8 @@ public: static InstallationLocations* Default() { - char sBuffer[sizeof(InstallationLocations)]; - InstallationLocations* sDefaultLocations + static char sBuffer[sizeof(InstallationLocations)]; + static InstallationLocations* sDefaultLocations = new(&sBuffer) InstallationLocations; return sDefaultLocations; }