diff options
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index b2fce4db09..05e9d2c3bc 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -296,9 +296,7 @@ void generateIV(uint8_t *iv, uint32_t &pVar) void padBuffer16(MBinBuffer &buf) { - uint8_t c = buf.length() % 16; - if (c == 0) - c = 16; + uint8_t c = 16 - buf.length() % 16; for (uint8_t i = 0; i < c; i++) buf.append(&c, 1); |