mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
Fix fmt::UTF exception for empty strings (#1084)
This commit is contained in:
parent
1d23f40e02
commit
b7e2903911
|
@ -26,7 +26,7 @@ struct UTF {
|
|||
T data;
|
||||
|
||||
explicit UTF(const std::u8string_view view) {
|
||||
data = T{(const char*)&view.front(), (const char*)&view.back() + 1};
|
||||
data = view.empty() ? T{} : T{(const char*)&view.front(), (const char*)&view.back() + 1};
|
||||
}
|
||||
|
||||
explicit UTF(const std::u8string& str) : UTF(std::u8string_view{str}) {}
|
||||
|
|
Loading…
Reference in a new issue