summaryrefslogtreecommitdiffstats
path: root/src/uscxml/Message.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-12 15:10:36 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-12 15:10:36 (GMT)
commit72fb2cd0bd89eb40d4a96f86d464d9801ad91f59 (patch)
treeea6ec14f4da720b2ec80d9b1c10904f13ee43d32 /src/uscxml/Message.cpp
parentba050afaaad699e60ca657b311d5c34d038bb89c (diff)
downloaduscxml-72fb2cd0bd89eb40d4a96f86d464d9801ad91f59.zip
uscxml-72fb2cd0bd89eb40d4a96f86d464d9801ad91f59.tar.gz
uscxml-72fb2cd0bd89eb40d4a96f86d464d9801ad91f59.tar.bz2
Got prolog datamodel to compile again
Diffstat (limited to 'src/uscxml/Message.cpp')
-rw-r--r--src/uscxml/Message.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/uscxml/Message.cpp b/src/uscxml/Message.cpp
index 0898cc7..c3f4281 100644
--- a/src/uscxml/Message.cpp
+++ b/src/uscxml/Message.cpp
@@ -188,13 +188,16 @@ Data Data::fromJSON(const std::string& jsonString) {
if (trimmed.length() == 0)
return data;
+ if (trimmed.find_first_of("{[") != 0)
+ return data;
+
jsmn_parser p;
jsmntok_t* t = NULL;
// we do not know the number of tokens beforehand, start with something sensible and increase
int rv;
- int frac = 16; // this will get decreased to 16 to first iteration for 1/16 length/token ratio
+ int frac = 16; // length/token ratio
do {
jsmn_init(&p);