zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
439 stars 195 forks source link

Avoid terminating NUL in socket::get(..., string&) #148

Closed tlbtlbtlb closed 8 years ago

tlbtlbtlb commented 8 years ago

When reading a string value from zmq_getsockopt, it includes the terminating NUL character in the size. Which is reasonable since it's advertised as a buffer size. But when zmqpp turns that into a C++ string, the terminating null is inappropriate. This patch removes the terminating NUL.