mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Cheats: Fix a debug assertion.
This commit is contained in:
parent
4ccf30d0a8
commit
adbd8d005c
1 changed files with 3 additions and 2 deletions
|
@ -30,10 +30,11 @@ void hleCheat(u64 userdata, int cyclesLate);
|
|||
|
||||
static inline std::string TrimString(const std::string &s) {
|
||||
auto wsfront = std::find_if_not(s.begin(), s.end(), [](int c) {
|
||||
return std::isspace(c);
|
||||
// isspace() expects 0 - 255, so convert any sign-extended value.
|
||||
return std::isspace(c & 0xFF);
|
||||
});
|
||||
auto wsback = std::find_if_not(s.rbegin(), s.rend(), [](int c){
|
||||
return std::isspace(c);
|
||||
return std::isspace(c & 0xFF);
|
||||
}).base();
|
||||
return wsback > wsfront ? std::string(wsfront, wsback) : std::string();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue