diff --git a/Net/src/HTMLForm.cpp b/Net/src/HTMLForm.cpp
index 7b9e4f008..92943092d 100644
--- a/Net/src/HTMLForm.cpp
+++ b/Net/src/HTMLForm.cpp
@@ -400,7 +400,7 @@ void HTMLForm::writeMultipart(std::ostream& ostr)
// count only, don't move stream position
std::streamsize partlen = ita->pSource->getContentLength();
if (partlen != PartSource::UNKNOWN_CONTENT_LENGTH)
- costr->addChars(partlen);
+ costr->addChars(static_cast(partlen));
else
costr->setIsValid(false);
}