Skip to content

Commit 38f014a

Browse files
author
shubh@DOE
committed
hope this fix the issue
1 parent bbc5ebb commit 38f014a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libc/src/stdio/printf_core/char_converter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ LIBC_INLINE int convert_char(Writer<write_mode> *writer,
4040
}
4141

4242
if (to_conv.length_modifier == LengthModifier::l) {
43-
wc = static_cast<wchar_t>(to_conv.conv_val_raw);
43+
wc = static_cast<wchar_t>(static_cast<unsigned int>(to_conv.conv_val_raw));
4444
ret = internal::wcrtomb(mb_str, wc, &internal_mbstate);
4545
if (ret <= 0) {
4646
return -1;

libc/test/src/stdio/printf_core/converter_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "hdr/types/wchar_t.h"
910
#include "src/stdio/printf_core/converter.h"
1011
#include "src/stdio/printf_core/core_structs.h"
1112
#include "src/stdio/printf_core/writer.h"
12-
#include "hdr/types/wchar_t.h"
1313
#include "test/UnitTest/Test.h"
1414

1515
class LlvmLibcPrintfConverterTest : public LIBC_NAMESPACE::testing::Test {

0 commit comments

Comments
 (0)