Skip to content

Commit b28a8db

Browse files
committed
Do not convert index from unsigned to signed when null termination in DecodeUnitsIntoAndNullTerminate
1 parent 218697e commit b28a8db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Common/Codex/Utf8Codex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ namespace utf8
427427
size_t DecodeUnitsIntoAndNullTerminate(char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options)
428428
{
429429
size_t result = DecodeUnitsInto(buffer, pbUtf8, pbEnd, options);
430-
buffer[(int)result] = 0;
430+
buffer[result] = 0;
431431
return result;
432432
}
433433

0 commit comments

Comments
 (0)