From d359631c8da793c4f7780dcbd04beef20c44b30f Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 26 Sep 2025 15:19:39 +0200 Subject: fix for C4244 truncation warning (#515) Fixes warning/error introduced with msvc cl 19.38.33145 --- src/zenutil/chunkedcontent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/zenutil/chunkedcontent.cpp') diff --git a/src/zenutil/chunkedcontent.cpp b/src/zenutil/chunkedcontent.cpp index 4f2aad95f..757bcfae5 100644 --- a/src/zenutil/chunkedcontent.cpp +++ b/src/zenutil/chunkedcontent.cpp @@ -930,7 +930,9 @@ BuildChunkedContentLookup(const ChunkedFolderContent& Content) for (uint32_t PathIndex = 0; PathIndex < Content.Paths.size(); PathIndex++) { std::string LowercaseExtension = Content.Paths[PathIndex].extension().string(); - std::transform(LowercaseExtension.begin(), LowercaseExtension.end(), LowercaseExtension.begin(), ::tolower); + std::transform(LowercaseExtension.begin(), LowercaseExtension.end(), LowercaseExtension.begin(), [](char c) { + return (char)::tolower(c); + }); Result.PathExtensionHash[PathIndex] = HashStringDjb2(LowercaseExtension); if (Content.RawSizes[PathIndex] > 0) { -- cgit v1.2.3