blob: 20e26c51942aa386b45d737d3b1cb7e4d69fc868 [file] [log] [blame]
--- a/xmlstring.c 2016-05-13 17:24:58.870079372 +0900
+++ b/xmlstring.c 2016-04-25 13:58:09.879238595 +0900
@@ -835,16 +835,20 @@
while ( len-- > 0) {
if ( !*ptr )
break;
- if ( (ch = *ptr++) & 0x80)
- while ((ch<<=1) & 0x80 ) {
- if (*ptr == 0) break;
+ 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;
+ }
+ }
}
return (ptr - utf);
}
-
/**
* xmlUTF8Strndup:
* @utf: the input UTF8 *