diff
+876  if (!s || !(str = Stream_PointerAs(s, WCHAR)))
+877  {
+878      fprintf(stderr, "Invalid stream or stream pointer.\n");
+879      return -1;
+880  }
881  if (length == 0)
882      return 0;
