Sam Jaffe 3 mesiacov pred
rodič
commit
9ab9476d66
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      include/jvalidate/format.h

+ 1 - 1
include/jvalidate/format.h

@@ -272,7 +272,7 @@ template <typename CharT = char> inline bool email(std::basic_string_view<CharT>
   domain.remove_prefix(1);
   domain.remove_suffix(1);
 
-  std::string ip(domain.size() + 1, '\0'); // Re-acquiring the NULL terminator
+  std::string ip(domain.size(), '\0'); // Re-acquiring the NULL terminator
   std::ranges::copy(domain, ip.begin());
 
   if (ip.starts_with("IPv6:")) {