shdocvw/tests: Fix test failures on XP SP2 and higher.
diff --git a/dlls/shdocvw/tests/shdocvw.c b/dlls/shdocvw/tests/shdocvw.c
index 963b9a8..8e7b1f3 100644
--- a/dlls/shdocvw/tests/shdocvw.c
+++ b/dlls/shdocvw/tests/shdocvw.c
@@ -251,9 +251,10 @@
         len = maxlen-1;
         dummy = 0;
         res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy);
-        ok( res == 0 && len == ParseURL_table[i].len + 1,
-            "#%d (-1): got %d and %d (expected '0' and %d)\n",
-            i, res, len, ParseURL_table[i].len + 1);
+        /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */
+        ok( res == 0 && (len == ParseURL_table[i].len || len == ParseURL_table[i].len + 1),
+            "#%d (-1): got %d and %d (expected '0' and %d or %d)\n",
+            i, res, len, ParseURL_table[i].len, ParseURL_table[i].len + 1);
 
         memset(buffer, '#', sizeof(buffer)-1);
         buffer[sizeof(buffer)-1] = '\0';
@@ -341,9 +342,10 @@
     len = maxlen - 1;
     dummy = 0;
     res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy);
-    ok( res == 0 && len == ParseURL_table[0].len + 1,
-        "-1: got %d and %d (expected '0' and %d)\n",
-        res, len, ParseURL_table[0].len + 1);
+    /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */
+    ok( res == 0 && (len == ParseURL_table[0].len || len == ParseURL_table[0].len + 1),
+        "-1: got %d and %d (expected '0' and %d or %d)\n",
+        res, len, ParseURL_table[0].len, ParseURL_table[0].len + 1);
 
 }