style fix: strlen(str) == 0 --> *str == 0

This commit is contained in:
Mikko Juola 2024-03-26 14:54:18 -07:00
parent cd7b5f7f78
commit a837649711

View file

@ -149,7 +149,7 @@ static void write_utf8_cstr_to_stdout(const char * str, bool & invalid_utf8) {
// MultiByteToWideChar reports an error if str is empty, don't report // MultiByteToWideChar reports an error if str is empty, don't report
// them as invalid_utf8. // them as invalid_utf8.
if (strlen(str) == 0) { if (*str == 0) {
return; return;
} }
int length_needed = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, strlen(str), NULL, 0); int length_needed = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, strlen(str), NULL, 0);