Parcourir la source

fix: set correct length of the stack-allocated comparison encoding

Julius Pfrommer il y a 8 ans
Parent
commit
2a127dc9e3
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/server/ua_subscription.c

+ 1 - 0
src/server/ua_subscription.c

@@ -105,6 +105,7 @@ detectValueChange(UA_MonitoredItem *mon, UA_DataValue *value,
         goto cleanup;
         goto cleanup;
 
 
     /* The value has changed */
     /* The value has changed */
+    encoding->length = encodingOffset;
     if(!mon->lastSampledValue.data || !UA_String_equal(encoding, &mon->lastSampledValue))
     if(!mon->lastSampledValue.data || !UA_String_equal(encoding, &mon->lastSampledValue))
         *changed = true;
         *changed = true;