mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 13:47:13 +01:00
MSVC build for chat example added
This commit is contained in:
@@ -42,7 +42,12 @@ int main (int argc, const char *argv [])
|
||||
// Prepare a message buffer. Place username at the beginning
|
||||
// of the message.
|
||||
char textbuf [1024];
|
||||
#ifdef _MSC_VER
|
||||
_snprintf_s (textbuf, sizeof (textbuf), sizeof (textbuf), "%s: ",
|
||||
username);
|
||||
#else
|
||||
snprintf (textbuf, sizeof (textbuf), "%s: ", username);
|
||||
#endif
|
||||
size_t prefixsz = strlen (textbuf);
|
||||
char *text = textbuf + prefixsz;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user