Skip to content

Commit

Permalink
cleanup(libsinsp): update g_invalidchar for windows
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Aug 5, 2024
1 parent d22f7a4 commit 85320ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion userspace/libsinsp/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ struct g_invalidchar
{
bool operator()(char c) const
{
unsigned char uc = static_cast<unsigned char>(c);
// Exclude all non-printable characters and control characters while
// including a wide range of languages (emojis, cyrillic, chinese etc)
return !(isprint((unsigned)c));
return (!(isprint(uc)));
}
};

Expand Down

0 comments on commit 85320ef

Please sign in to comment.