Sam Jaffe преди 3 месеца
родител
ревизия
9ab9476d66
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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:")) {