Browse Source

use _snprintf_s on MSVC

Julius Pfrommer 9 years ago
parent
commit
443b4949ea
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/networklayer_tcp.c

+ 1 - 1
examples/networklayer_tcp.c

@@ -433,7 +433,7 @@ UA_ServerNetworkLayer * ServerNetworkLayerTCP_new(UA_ConnectionConfig conf, UA_U
 #ifndef _MSVC
         str.length = snprintf(discoveryUrl, 255, "opc.tcp://%s:%d", hostname, port);
 #else
-        str.length = _snprintf(discoveryUrl, 255, "opc.tcp://%s:%d", hostname, port);
+        str.length = _snprintf_s(discoveryUrl, 255, _TRUNCATE, "opc.tcp://%s:%d", hostname, port);
 #endif
         str.data = (UA_Byte*)discoveryUrl;
         UA_String_copy(&str, &layer->layer.discoveryUrl);