From 885a3fff9be755485bdcabc0a48b4e399f0b89d8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Jun 2013 21:23:05 +0000 Subject: fix for the endless recursion in Wassup git-svn-id: http://svn.miranda-ng.org/main/trunk@4866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++') diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp index 96ef32f415..6b2d02d4f9 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp @@ -129,13 +129,13 @@ void BinTreeNodeWriter::writeAttributes(std::map* attributes) { void BinTreeNodeWriter::writeString(const std::string& tag) { std::map::iterator it = this->tokenMap.find(tag); - if (it != this->tokenMap.end()) { + if (it != this->tokenMap.end()) writeToken(it->second); - } else { - unsigned int atIndex = tag.find('@'); - if (atIndex == 0 || atIndex == string::npos) { + else { + size_t atIndex = tag.find('@'); + if (atIndex == 0 || atIndex == string::npos) writeBytes((unsigned char*) tag.data(), tag.length()); - } else { + else { std::string server = tag.substr(atIndex + 1); std::string user = tag.substr(0, atIndex); writeJid(&user, server); -- cgit v1.2.3