Fix issue where double array was not fetched from CBOR correctly. 01/9101/2
authorJoseph Morrow <joseph.l.morrow@intel.com>
Sat, 2 Jul 2016 23:17:51 +0000 (16:17 -0700)
committerHabib Virji <habib.virji@samsung.com>
Mon, 4 Jul 2016 09:05:55 +0000 (09:05 +0000)
Change-Id: I7d7f9ac4fe216d883ddb26d624136d098a8a7a14
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9101
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
resource/csdk/stack/src/ocpayload.c

index be9b080..0ac5e2d 100644 (file)
@@ -983,7 +983,7 @@ bool OCRepPayloadGetDoubleArray(const OCRepPayload* payload, const char* name,
         return false;
     }
 
-    if (val->arr.type != OCREP_PROP_DOUBLE)
+    if (val->arr.type == OCREP_PROP_DOUBLE)
     {
         memcpy(*array, val->arr.dArray, dimTotal * sizeof(double));
     }