| Index: third_party/libxml/src/xmlstring.c
|
| diff --git a/third_party/libxml/src/xmlstring.c b/third_party/libxml/src/xmlstring.c
|
| index d9b5085db430e7ce6b260f885472bccdf92017b6..b6dd10121845c39d114ada3af3b61ea8f5a6b134 100644
|
| --- a/third_party/libxml/src/xmlstring.c
|
| +++ b/third_party/libxml/src/xmlstring.c
|
| @@ -821,13 +821,6 @@ xmlCheckUTF8(const unsigned char *utf)
|
| * the first 'len' characters of ARRAY
|
| */
|
|
|
| -#if _MSC_FULL_VER && _MSC_FULL_VER == 190023918
|
| -// Workaround for a /O1 ("s") optimization bug in VS 2015 Update 2, remove once
|
| -// the fix is released. crbug.com/599427
|
| -// https://connect.microsoft.com/VisualStudio/feedback/details/2582138
|
| -#pragma optimize("t", on)
|
| -#endif
|
| -
|
| int
|
| xmlUTF8Strsize(const xmlChar *utf, int len) {
|
| const xmlChar *ptr=utf;
|
| @@ -842,20 +835,20 @@ xmlUTF8Strsize(const xmlChar *utf, int len) {
|
| while ( len-- > 0) {
|
| if ( !*ptr )
|
| break;
|
| - if ( (ch = *ptr++) & 0x80)
|
| - while ((ch<<=1) & 0x80 ) {
|
| + if ( (ch = *ptr++) & 0x80) {
|
| + // Workaround for an optimization bug in VS 2015 Update 2, remove
|
| + // once the fix is released. crbug.com/599427
|
| + // https://connect.microsoft.com/VisualStudio/feedback/details/2582138
|
| + xmlChar ch2 = ch;
|
| + while ((ch2<<=1) & 0x80 ) {
|
| ptr++;
|
| - if (*ptr == 0) break;
|
| - }
|
| + if (*ptr == 0) break;
|
| + }
|
| + }
|
| }
|
| return (ptr - utf);
|
| }
|
|
|
| -#if _MSC_FULL_VER && _MSC_FULL_VER == 190023918
|
| -// Restore the original optimization settings.
|
| -#pragma optimize("", on)
|
| -#endif
|
| -
|
| /**
|
| * xmlUTF8Strndup:
|
| * @utf: the input UTF8 *
|
|
|