summaryrefslogtreecommitdiff
path: root/src/xrep.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-05-06 15:51:56 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-05-06 15:51:56 +0200
commit0c5b781e97f2bea42925495a5505c51e769fba7f (patch)
treea692c1af6e03a47d35caaa84cbed4f7020a258d7 /src/xrep.cpp
parent3ef7c747ac68214ca463b2f52244fcec92151a46 (diff)
urrent pipe pointer in XREP out of range -- fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/xrep.cpp')
-rw-r--r--src/xrep.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xrep.cpp b/src/xrep.cpp
index 15fac8d..77481c3 100644
--- a/src/xrep.cpp
+++ b/src/xrep.cpp
@@ -103,6 +103,8 @@ void zmq::xrep_t::terminated (reader_t *pipe_)
if ((inpipes_t::size_type) (it - inpipes.begin ()) < current_in)
current_in--;
inpipes.erase (it);
+ if (current_in >= inpipes.size ())
+ current_in = 0;
if (terminating)
unregister_term_ack ();
return;