diff --git a/html/src/TDocParser.cxx b/html/src/TDocParser.cxx
index fa118796f3203b5a2fbff03dbde02fa3f317ee4f..6180d90b8d9a186b0d07ef3fee039bb7de9d81b1 100644
--- a/html/src/TDocParser.cxx
+++ b/html/src/TDocParser.cxx
@@ -1974,7 +1974,13 @@ void TDocParser::WriteMethod(std::ostream& out, TString& ret,
 
    TMethod* guessedMethod = 0;
    int nparams = params.CountChar(',');
-   if (params.Length()) ++nparams;
+   TString strippedParams(params);
+   if (strippedParams[0] == '(') {
+      strippedParams.Remove(0, 1);
+      strippedParams.Remove(strippedParams.Length() - 1);
+   }
+   if (strippedParams.Strip(TString::kBoth).Length())
+      ++nparams;
 
    TMethod* method = 0;
    TIter nextMethod(fCurrentClass->GetListOfMethods());