Skip to content

Commit 2f867a8

Browse files
committed
Use generic_u8string() for map key strings because worlds can have unicode
1 parent 3aa1b84 commit 2f867a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zzip.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ std::shared_ptr<zzip> zzip::load( std::filesystem::path const &path,
390390
if( dictionary_path.empty() ) {
391391
cctx = ZSTD_createCCtx();
392392
dctx = ZSTD_createDCtx();
393-
} else if( auto it = cached_contexts.find( dictionary_path.string() );
393+
} else if( auto it = cached_contexts.find( dictionary_path.generic_u8string() );
394394
it != cached_contexts.end() ) {
395395
cctx = it->second.cctx;
396396
dctx = it->second.dctx;
@@ -408,7 +408,7 @@ std::shared_ptr<zzip> zzip::load( std::filesystem::path const &path,
408408
ZSTD_DCtx_loadDictionary_byReference( dctx, dictionary.data(), dictionary.size() );
409409
}
410410

411-
cached_contexts.emplace( dictionary_path.string(), cached_zstd_context{ std::move( dictionary ), cctx, dctx } );
411+
cached_contexts.emplace( dictionary_path.generic_u8string(), cached_zstd_context{ std::move( dictionary ), cctx, dctx } );
412412
}
413413

414414
zip->ctx_ = std::make_unique<zzip::context>( cctx, dctx );

0 commit comments

Comments
 (0)