fix new bug in parsing amqp:// address where the default vhost was incorrectly overwritten

This commit is contained in:
Daan Mulder 2017-05-11 13:59:07 +02:00
parent 8501f19c0b
commit b2877434cf
1 changed files with 34 additions and 34 deletions

View File

@ -92,7 +92,7 @@ public:
const char *slash = (const char *)memchr(data, '/', last - data);
// was a vhost set?
if (slash != nullptr && last - data > 1) _vhost.assign(slash + 1, last - slash - 1);
if (slash != nullptr && last - slash > 1) _vhost.assign(slash + 1, last - slash - 1);
// the hostname is everything until the slash, check is portnumber was set
const char *colon = (const char *)memchr(data, ':', last - data);