Fix signed/unsigned comparison in EscapeJSON

This commit is contained in:
Brad King 2011-05-16 11:55:56 -04:00
parent 8346a28a0a
commit c9174c0e4b
1 changed files with 1 additions and 1 deletions

View File

@ -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 += '\\';
}