From 44e8c873e2ab19c1c5761c0e20848827b6e5a2c2 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Sat, 25 Feb 2017 17:42:42 +0100 Subject: [PATCH] msg: end parameter in entity_addr_t::parse is optional Signed-off-by: Mykola Golub --- src/msg/msg_types.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/msg/msg_types.cc b/src/msg/msg_types.cc index 1d118e9455c..67a699c9c4d 100644 --- a/src/msg/msg_types.cc +++ b/src/msg/msg_types.cc @@ -76,7 +76,9 @@ bool entity_addr_t::parse(const char *s, const char **end) newtype = TYPE_MSGR2; } else if (*s == '-') { *this = entity_addr_t(); - *end = s + 1; + if (end) { + *end = s + 1; + } return true; } -- 2.47.3