diff options
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r-- | indra/newview/llfloateruipreview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 9bc075d03f..af58c6316d 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -1043,7 +1043,9 @@ void LLFloaterUIPreview::getExecutablePath(const std::vector<std::string>& filen { CFStringRef executable_cfstr = (CFStringRef)CFDictionaryGetValue(bundleInfoDict, CFSTR("CFBundleExecutable")); // get the name of the actual executable (e.g. TextEdit or firefox-bin) int max_file_length = 256; // (max file name length is 255 in OSX) - char executable_buf[max_file_length]; + + // Xcode 26: VLAs are a clang extension. Just create the buffer and delete it after. + char *executable_buf = new char [max_file_length]; if(CFStringGetCString(executable_cfstr, executable_buf, max_file_length, kCFStringEncodingMacRoman)) // convert CFStringRef to char* { executable_path += std::string("/Contents/MacOS/") + std::string(executable_buf); // append path to executable directory and then executable name to exec path @@ -1053,6 +1055,7 @@ void LLFloaterUIPreview::getExecutablePath(const std::vector<std::string>& filen std::string warning = "Unable to get CString from CFString for executable path"; popupAndPrintWarning(warning); } + delete [] executable_buf; } else { |