Skip to content

Commit 194b8e0

Browse files
committed
fix incorrect null terminator check
1 parent 6a2a111 commit 194b8e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/__support/wchar/string_converter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ template <typename T> class StringConverter {
7878
}
7979

8080
ErrorOr<CharType> out = cr.pop<CharType>();
81-
if (out.has_value() && out.value() == L'\0')
81+
if (out.has_value() && out.value() == 0) // if out isn't null terminator or an error
8282
src_len = src_idx;
8383

8484
num_to_write--;

0 commit comments

Comments
 (0)