Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
Check only single byte of UTF-8 characters in isspace_c(). (mac_fix_s…
Browse files Browse the repository at this point in the history
…pace xbmc#4896)
  • Loading branch information
epoke committed Jun 16, 2014
1 parent 97b3192 commit 35645da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xbmc/utils/StringUtils.cpp
Expand Up @@ -447,6 +447,8 @@ std::string& StringUtils::Trim(std::string &str, const char* const chars)
// without this hack "TrimX" functions failed on Win32 with UTF-8 strings
static int isspace_c(char c)
{
if(((unsigned char)c) & 0x80) // Check only single byte of UTF-8 strings
return 0;
return ::isspace((unsigned char)c);
}

Expand Down

0 comments on commit 35645da

Please sign in to comment.