Browse Source

macOS: Be explicit about string encodings when logging assertions

tags/2021-05-28
reuk 5 years ago
parent
commit
be1e3df4d0
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/juce_core/logging/juce_Logger.cpp
  2. +1
    -1
      modules/juce_core/native/juce_mac_Files.mm

+ 1
- 1
modules/juce_core/logging/juce_Logger.cpp View File

@@ -49,7 +49,7 @@ void Logger::writeToLog (const String& message)
void JUCE_API JUCE_CALLTYPE logAssertion (const char* const filename, const int lineNum) noexcept
{
String m ("JUCE Assertion failure in ");
m << File::createFileWithoutCheckingPath (filename).getFileName() << ':' << lineNum;
m << File::createFileWithoutCheckingPath (CharPointer_UTF8 (filename)).getFileName() << ':' << lineNum;
#if JUCE_LOG_ASSERTIONS
Logger::writeToLog (m);


+ 1
- 1
modules/juce_core/native/juce_mac_Files.mm View File

@@ -201,7 +201,7 @@ File File::getSpecialLocation (const SpecialLocationType type)
case invokedExecutableFile:
if (juce_argv != nullptr && juce_argc > 0)
return File::getCurrentWorkingDirectory().getChildFile (String (juce_argv[0]));
return File::getCurrentWorkingDirectory().getChildFile (CharPointer_UTF8 (juce_argv[0]));
// deliberate fall-through...
JUCE_FALLTHROUGH


Loading…
Cancel
Save