mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-18 20:09:54 +00:00
Prevent segfault on empty string_view
This commit is contained in:
parent
24403cdd25
commit
b8bfc13cf9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user