Julius Pfrommer 8 years ago
parent
commit
cad923d719
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/ua_types_encoding_binary.c

+ 4 - 4
src/ua_types_encoding_binary.c

@@ -985,16 +985,16 @@ DataValue_decodeBinary(UA_DataValue *dst, const UA_DataType *_) {
         dst->hasSourceTimestamp = true;
         retval |= DateTime_decodeBinary(&dst->sourceTimestamp);
     }
-    if(encodingMask & 0x08) {
-        dst->hasServerTimestamp = true;
-        retval |= DateTime_decodeBinary(&dst->serverTimestamp);
-    }
     if(encodingMask & 0x10) {
         dst->hasSourcePicoseconds = true;
         retval |= UInt16_decodeBinary(&dst->sourcePicoseconds, NULL);
         if(dst->sourcePicoseconds > MAX_PICO_SECONDS)
             dst->sourcePicoseconds = MAX_PICO_SECONDS;
     }
+    if(encodingMask & 0x08) {
+        dst->hasServerTimestamp = true;
+        retval |= DateTime_decodeBinary(&dst->serverTimestamp);
+    }
     if(encodingMask & 0x20) {
         dst->hasServerPicoseconds = true;
         retval |= UInt16_decodeBinary(&dst->serverPicoseconds, NULL);