changeset 3406:8de071691d13

fix for visual studio 2008
author s.jodogne@gmail.com
date Sat, 08 Jun 2019 10:30:00 +0200
parents 408ffcb4038f
children b7728227a852 1787ad594063
files Core/HttpServer/MultipartStreamReader.cpp Core/HttpServer/StringMatcher.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpServer/MultipartStreamReader.cpp	Sat Jun 08 09:11:33 2019 +0200
+++ b/Core/HttpServer/MultipartStreamReader.cpp	Sat Jun 08 10:30:00 2019 +0200
@@ -192,7 +192,7 @@
         }
       }
 
-      if (headersMatcher_.GetMatchEnd() + contentLength + 2 > corpusEnd)
+	  if (static_cast<ssize_t>(contentLength + 2) > std::distance(headersMatcher_.GetMatchEnd(), corpusEnd))
       {
         break;  // Not enough data available to have a full part
       }
--- a/Core/HttpServer/StringMatcher.cpp	Sat Jun 08 09:11:33 2019 +0200
+++ b/Core/HttpServer/StringMatcher.cpp	Sat Jun 08 10:30:00 2019 +0200
@@ -137,6 +137,6 @@
 
   const char* StringMatcher::GetPointerEnd() const
   {
-    return &GetMatchEnd()[0];
+    return GetPointerBegin() + pattern_.size();
   }
 }