Explorar o código

AK: Allow zero-valued signed size types in format strings

Andrew Kaster %!s(int64=2) %!d(string=hai) anos
pai
achega
a2ef168d75
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AK/Format.h

+ 1 - 1
AK/Format.h

@@ -136,7 +136,7 @@ struct TypeErasedParameter {
             if constexpr (sizeof(T) > sizeof(size_t))
                 VERIFY(value < NumericLimits<size_t>::max());
             if constexpr (IsSigned<T>)
-                VERIFY(value > 0);
+                VERIFY(value >= 0);
             return static_cast<size_t>(value);
         });
     }