Commit 998472d1 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp: Fix format parsing in time_put_wchar_put_format.

parent 35a887ac
......@@ -7589,15 +7589,16 @@ ostreambuf_iterator_wchar* __thiscall time_put_wchar_put_format(const time_put *
ostreambuf_iterator_wchar_put(&dest, *pat++);
}else if(++pat == pat_end) {
ostreambuf_iterator_wchar_put(&dest, percent);
}else if(!_Wcrtomb(c, *pat, NULL, &this->cvt) || (*c=='#' && pat+1==pat_end)) {
}else if(_Wcrtomb(c, *pat, NULL, &this->cvt)!=1 || (*c=='#' && pat+1==pat_end)) {
ostreambuf_iterator_wchar_put(&dest, percent);
ostreambuf_iterator_wchar_put(&dest, *pat++);
}else {
pat++;
if(*c == '#') {
if(!_Wcrtomb(c, *pat++, NULL, &this->cvt)) {
if(_Wcrtomb(c, *pat++, NULL, &this->cvt) != 1) {
ostreambuf_iterator_wchar_put(&dest, percent);
ostreambuf_iterator_wchar_put(&dest, *(pat-2));
ostreambuf_iterator_wchar_put(&dest, *(pat-1));
ostreambuf_iterator_wchar_put(&dest, *pat);
}else {
time_put_wchar_put(this, &dest, dest, base, t, *c, '#');
}
......
......@@ -9249,15 +9249,16 @@ ostreambuf_iterator_wchar* __thiscall time_put_wchar_put_format(const time_put *
ostreambuf_iterator_wchar_put(&dest, *pat++);
}else if(++pat == pat_end) {
ostreambuf_iterator_wchar_put(&dest, percent);
}else if(!_Wcrtomb(c, *pat, NULL, &this->cvt) || (*c=='#' && pat+1==pat_end)) {
}else if(_Wcrtomb(c, *pat, NULL, &this->cvt)!=1 || (*c=='#' && pat+1==pat_end)) {
ostreambuf_iterator_wchar_put(&dest, percent);
ostreambuf_iterator_wchar_put(&dest, *pat++);
}else {
pat++;
if(*c == '#') {
if(!_Wcrtomb(c, *pat++, NULL, &this->cvt)) {
if(_Wcrtomb(c, *pat++, NULL, &this->cvt) != 1) {
ostreambuf_iterator_wchar_put(&dest, percent);
ostreambuf_iterator_wchar_put(&dest, *(pat-2));
ostreambuf_iterator_wchar_put(&dest, *(pat-1));
ostreambuf_iterator_wchar_put(&dest, *pat);
}else {
time_put_wchar_put(this, &dest, dest, base, fill, t, *c, '#');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment