Merge pull request #159 from bluca/mechanism_off_by_one

Problem: socket_type_string off-by-one error
This commit is contained in:
Doron Somech 2016-11-04 14:55:54 +02:00 committed by GitHub
commit f53060ee60

View File

@ -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];
}