Prevent segfault on empty string_view
This commit is contained in:
parent
24403cdd25
commit
b8bfc13cf9
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
inline std::int64_t from_chars(const char *begin, const char *end) {
|
||||||
|
if(begin == end) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
std::int64_t res {};
|
std::int64_t res {};
|
||||||
std::int64_t mul = 1;
|
std::int64_t mul = 1;
|
||||||
while(begin != --end) {
|
while(begin != --end) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue