mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
/W4: Fix incorrect type cast
Values passed to functions from '<cctype>' must be representable as unsigned chars to avoid undefined behavior.
This commit is contained in:
parent
0f461b7695
commit
978f108526
@ -243,8 +243,8 @@ char* StripQuotes(const char* pInBuffer, char* pOutBuffer, int nOutBufferSize)
|
||||
// For finding a partial string within input (case insensitive).
|
||||
bool HasPartial(const string& svInput, const string& svPartial)
|
||||
{
|
||||
auto it = std::search( svInput.begin(), svInput.end(),
|
||||
svPartial.begin(), svPartial.end(), [](char ci, char cp)
|
||||
auto it = std::search(svInput.begin(), svInput.end(),
|
||||
svPartial.begin(), svPartial.end(), [](unsigned char ci, unsigned char cp)
|
||||
{
|
||||
return std::toupper(ci) == std::toupper(cp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user