Fix clang warnings

This commit is contained in:
Howard Hinnant
2014-02-25 15:49:27 -05:00
committed by Vinnie Falco
parent 8eddcfd3d5
commit bb02112752
10 changed files with 41 additions and 14 deletions

View File

@@ -343,9 +343,9 @@ public:
const beast_wchar c = src.getAndAdvance();
const size_t bytesNeeded = DestCharPointerType::getBytesRequiredFor (c);
maxBytes -= bytesNeeded;
if (c == 0 || maxBytes < 0)
if (c == 0 || maxBytes < bytesNeeded)
break;
maxBytes -= bytesNeeded;
dest.write (c);
}