Explorar el Código

Encoding: Fix potential masking of an error code

Julius Pfrommer hace 6 años
padre
commit
37d7ed5170
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/ua_types_encoding_binary.c

+ 2 - 2
src/ua_types_encoding_binary.c

@@ -117,9 +117,9 @@ encodeWithExchangeBuffer(const void *ptr, encodeBinarySignature encodeFunc, Ctx
         ret = exchangeBuffer(ctx);
         if(ret != UA_STATUSCODE_GOOD)
             return ret;
-        encodeFunc(ptr, NULL, ctx);
+        ret = encodeFunc(ptr, NULL, ctx);
     }
-    return UA_STATUSCODE_GOOD;
+    return ret;
 }
 
 #define ENCODE_WITHEXCHANGE(VAR, TYPE) \