diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 0dd15feaa94..37e594e7628 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -959,7 +959,7 @@ Strings and formatting - *Rationale*: Qt has built-in functionality for converting their string type from/to C++. No need to roll your own. - - In cases where do you call `.c_str()`, you might want to additionally check that the string does not contain embedded '\0' characters, because + - In cases where you do call `.c_str()`, you might want to additionally check that the string does not contain embedded '\0' characters, because it will (necessarily) truncate the string. This might be used to hide parts of the string from logging or to circumvent checks. If a use of strings is sensitive to this, take care to check the string for embedded NULL characters first and reject it if there are any (see `ParsePrechecks` in `strencodings.cpp` for an example).