Fix signed/unsigned comparison in EscapeJSON
This commit is contained in:
parent
8346a28a0a
commit
c9174c0e4b
|
@ -142,7 +142,7 @@ void cmGlobalUnixMakefileGenerator3
|
|||
//----------------------------------------------------------------------------
|
||||
std::string EscapeJSON(const std::string& s) {
|
||||
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] == '\\') {
|
||||
result += '\\';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue