Srdjan Veljkovic / Mbed 2 deprecated AvnetATT_Pubnub

Dependencies:   FXOS8700CQ mbed

Files at this revision

API Documentation at this revision

Comitter:
sveljko
Date:
Wed Aug 31 18:04:30 2016 +0000
Parent:
35:d0d86a2bcdb3
Commit message:
Fixed "gobbling" of the last character in received message (from the subscribe transaction);

Changed in this revision

pubnub.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/pubnub.cpp	Tue Aug 30 22:02:03 2016 +0000
+++ b/pubnub.cpp	Wed Aug 31 18:04:30 2016 +0000
@@ -127,7 +127,7 @@
                 break;
             case ',':
                 if (bracket_level == 1) {
-                    messages.push_back(std::string(start, end-start-1));
+                    messages.push_back(std::string(start, end-start));
                     start = end + 1;
                 }
                 break;
@@ -141,7 +141,7 @@
             case ']':
                 if (--bracket_level <= 0) {
                     if (end-start-1 > 0) {
-                        messages.push_back(std::string(start, end-start-1));
+                        messages.push_back(std::string(start, end-start));
                     }
                     state = done;
                 }