Prevent segfault on empty string_view

This commit is contained in:
Loki 2021-08-08 13:59:43 +02:00
parent 24403cdd25
commit b8bfc13cf9

View File

@ -389,6 +389,10 @@ auto enm(T &val) -> std::underlying_type_t<T> & {
}
inline std::int64_t from_chars(const char *begin, const char *end) {
if(begin == end) {
return 0;
}
std::int64_t res {};
std::int64_t mul = 1;
while(begin != --end) {