Skip to content

Commit

Permalink
Fix windows compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Aug 25, 2024
1 parent b9d2090 commit 46b1a4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/juce_core/native/juce_SystemStats_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,15 +817,15 @@ String SystemStats::getUniqueDeviceID()
const auto stringFromOffset = [&content, &strings] (size_t byteOffset) -> String
{
if (! isPositiveAndBelow (byteOffset, content.size()))
return std::string {};
return {};

const auto index = std::to_integer<size_t> (content[byteOffset]);

if (index <= 0 || strings.size() < index)
return std::string {};
return {};

const auto view = strings[index - 1];
return std::string { view };
return String::fromUTF8 (view.data(), (int) view.size());
};

enum
Expand Down

0 comments on commit 46b1a4d

Please sign in to comment.