Skip to content

Commit

Permalink
Fixed use-of-uninitialized-value in encodeCodepoint()
Browse files Browse the repository at this point in the history
  • Loading branch information
bblanchon committed Aug 3, 2020
1 parent a1ac157 commit ba3a9b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ArduinoJson/Json/Utf16.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ inline bool isLowSurrogate(uint16_t codeunit) {

class Codepoint {
public:
Codepoint() : _highSurrogate(0) {}

bool append(uint16_t codeunit) {
if (isHighSurrogate(codeunit)) {
_highSurrogate = codeunit & 0x3FF;
Expand Down

0 comments on commit ba3a9b3

Please sign in to comment.