diff options
Diffstat (limited to 'protocols/Tox')
-rw-r--r-- | protocols/Tox/src/tox_messages.cpp | 9 | ||||
-rw-r--r-- | protocols/Tox/src/version.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp index ddcf5fa2f8..afa7c6e445 100644 --- a/protocols/Tox/src/tox_messages.cpp +++ b/protocols/Tox/src/tox_messages.cpp @@ -12,7 +12,14 @@ void CToxProto::OnFriendMessage(Tox*, uint32_t friendNumber, TOX_MESSAGE_TYPE ty return;
char *rawMessage = (char*)mir_alloc(length + 1);
- mir_strncpy(rawMessage, (const char*)message, length);
+ // old api support
+ if (message[0] == 0 && length > 0)
+ {
+ length -= 3;
+ mir_strncpy(rawMessage, (const char*)&message[4], length);
+ }
+ else
+ mir_strncpy(rawMessage, (const char*)message, length);
rawMessage[length] = 0;
PROTORECVEVENT recv = { 0 };
diff --git a/protocols/Tox/src/version.h b/protocols/Tox/src/version.h index d9040b8af6..20350753fa 100644 --- a/protocols/Tox/src/version.h +++ b/protocols/Tox/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 11
#define __RELEASE_NUM 1
-#define __BUILD_NUM 0
+#define __BUILD_NUM 1
#include <stdver.h>
|