MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / IsSpace

Function IsSpace

Libraries/unrar/strfn.cpp:183–186  ·  view source on GitHub ↗

We do not want to cast every signed char to unsigned when passing to isspace, so we implement the replacement. Shall work for Unicode too. If chars are signed, conversion from char to int could generate negative values, resulting in undefined behavior in standard isspace.

Source from the content-addressed store, hash-verified

181// If chars are signed, conversion from char to int could generate negative
182// values, resulting in undefined behavior in standard isspace.
183bool IsSpace(int ch)
184{
185 return ch==' ' || ch=='\t';
186}
187
188
189// We do not want to cast every signed char to unsigned when passing to

Callers 2

GetCmdParamFunction · 0.85
ReadConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected