mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 02:17:27 +08:00
Fix signed/unsigned comparison in EscapeJSON
This commit is contained in:
@@ -142,7 +142,7 @@ void cmGlobalUnixMakefileGenerator3
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
std::string EscapeJSON(const std::string& s) {
|
std::string EscapeJSON(const std::string& s) {
|
||||||
std::string result;
|
std::string result;
|
||||||
for (int i = 0; i < s.size(); ++i) {
|
for (std::string::size_type i = 0; i < s.size(); ++i) {
|
||||||
if (s[i] == '"' || s[i] == '\\') {
|
if (s[i] == '"' || s[i] == '\\') {
|
||||||
result += '\\';
|
result += '\\';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user