Index: src/support/win32/support.cpp =================================================================== --- src/support/win32/support.cpp +++ src/support/win32/support.cpp @@ -73,6 +73,11 @@ size_t result = 0; bool have_result = false; + // If dst is null then max_dest_chars should be ignored according to the + // standard. Setting max_dest_chars to a large value has this effect. + if (!dst) + max_dest_chars = static_cast(-1); + while ( source_remaining ) { if ( dst && dest_converted >= max_dest_chars ) break; @@ -126,6 +131,11 @@ bool have_result = false; bool terminator_found = false; + // If dst is null then dst_size_bytes should be ignored according to the + // standard. Setting dest_remaining to a large value has this effect. + if (!dst) + dest_remaining = static_cast(-1); + while ( source_converted != max_source_chars ) { if ( ! dest_remaining ) break;