mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-20 18:48:16 +00:00
Merge pull request #159 from bluca/mechanism_off_by_one
Problem: socket_type_string off-by-one error
This commit is contained in:
commit
f53060ee60
@ -75,7 +75,7 @@ const char *zmq::mechanism_t::socket_type_string (int socket_type) const
|
||||
static const char *names [] = {"PAIR", "PUB", "SUB", "REQ", "REP",
|
||||
"DEALER", "ROUTER", "PULL", "PUSH",
|
||||
"XPUB", "XSUB", "STREAM"};
|
||||
zmq_assert (socket_type >= 0 && socket_type <= 10);
|
||||
zmq_assert (socket_type >= 0 && socket_type <= 11);
|
||||
return names [socket_type];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user