diff options
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp index 99c186f126..0cb12b2e93 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp @@ -183,25 +183,25 @@ ReadData* BinTreeNodeReader::readString(int token) }
return ret;
- case 255: - bSize = readInt8(this->in); - { - int size = bSize & 0x7f; - int numnibbles = size * 2 - ((bSize & 0x80) ? 1 : 0); - + case 255:
+ bSize = readInt8(this->in);
+ {
+ int size = bSize & 0x7f;
+ int numnibbles = size * 2 - ((bSize & 0x80) ? 1 : 0);
+
std::vector<unsigned char> tmp(size);
fillArray(tmp, size, this->in);
- std::string s; - for (int i = 0; i < numnibbles; i++) { - char c = (tmp[i / 2] >> (4 - ((i & 1) << 2))) & 0xF; - if (c < 10) s += (c + '0'); - else s += (c - 10 + '-'); - } - + std::string s;
+ for (int i = 0; i < numnibbles; i++) {
+ char c = (tmp[i / 2] >> (4 - ((i & 1) << 2))) & 0xF;
+ if (c < 10) s += (c + '0');
+ else s += (c - 10 + '-');
+ }
+
ret->type = STRING;
ret->data = new std::string(s);
- } - return ret; + }
+ return ret;
case 250:
std::string* user = readStringAsString();
|