Skip to content

Commit 439df58

Browse files
committed
Fix long path regression.
1 parent 3e2a278 commit 439df58

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/unicode/utf8_everywhere/paths.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ std::filesystem::path to_path(const std::string& value) NOEXCEPT
5757
BC_POP_WARNING()
5858
}
5959

60-
#ifdef HAVE_MSC
60+
#if defined(HAVE_MSC)
6161
static std::wstring config_directory() NOEXCEPT
6262
{
6363
wchar_t directory[MAX_PATH];
@@ -80,15 +80,15 @@ std::filesystem::path default_config_path(
8080
BC_POP_WARNING()
8181
}
8282

83-
#ifdef HAVE_MSC
83+
#if defined(HAVE_MSC)
8484

8585
// Helper for to_fully_qualified_path.
8686
inline auto replace_all(std::wstring text, wchar_t from, wchar_t to) NOEXCEPT
8787
{
8888
for (auto position = text.find(from); position != std::string::npos;
89-
position = text.find(from, position + sizeof(wchar_t)))
89+
position = text.find(from, add1(position)))
9090
{
91-
text.replace(position, sizeof(wchar_t), { to });
91+
text.replace(position, one, { to });
9292
}
9393

9494
return text;

0 commit comments

Comments
 (0)