Skip to content

Commit

Permalink
ccode: fix oclint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kodebach committed Oct 2, 2020
1 parent 495410c commit 6120185
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/ccode/coder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ string Coder::encodeString (string const & text)
for (unsigned char character : text)
{
const auto & encodedChar = encode[character];
if (encodedChar != '\0')
if (encodedChar == '\0')
{
encoded.push_back (escapeCharacter);
encoded.push_back (encodedChar);
encoded.push_back (character);
}
else
{
encoded.push_back (character);
encoded.push_back (escapeCharacter);
encoded.push_back (encodedChar);
}
}

Expand Down

0 comments on commit 6120185

Please sign in to comment.