Fix wchar mode
This commit is contained in:
parent
e45c173f73
commit
e7f1e3d9dd
@ -4487,14 +4487,14 @@ PUGI__NS_BEGIN
|
|||||||
{
|
{
|
||||||
#ifdef PUGIXML_WCHAR_MODE
|
#ifdef PUGIXML_WCHAR_MODE
|
||||||
char_t wbuf[128];
|
char_t wbuf[128];
|
||||||
assert(strlength(buf) < sizeof(wbuf) / sizeof(wbuf[0]));
|
assert(strlen(buf) < sizeof(wbuf) / sizeof(wbuf[0]));
|
||||||
|
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
for (; buf[offset]; ++offset) wbuf[offset] = buf[offset];
|
for (; buf[offset]; ++offset) wbuf[offset] = buf[offset];
|
||||||
|
|
||||||
return strcpy_insitu(dest, header, header_mask, wbuf, offset);
|
return strcpy_insitu(dest, header, header_mask, wbuf, offset);
|
||||||
#else
|
#else
|
||||||
return strcpy_insitu(dest, header, header_mask, buf, strlength(buf));
|
return strcpy_insitu(dest, header, header_mask, buf, strlen(buf));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user