diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h index 60f9f3c..ef810ec 100644 --- a/include/jwt-cpp/jwt.h +++ b/include/jwt-cpp/jwt.h @@ -1420,6 +1420,7 @@ namespace jwt { std::ostringstream iss; iss << value_type(obj_header); std::string header = encode(iss.str()); + iss.str(std::string()); iss.clear(); iss << value_type(obj_payload); std::string payload = encode(iss.str());