From 730c452ff5896ed66114e6b2153add9379edef5c Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Feb 2010 12:36:17 +0000 Subject: network info messages bugfixes --- src/core/info.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/info.cc') diff --git a/src/core/info.cc b/src/core/info.cc index dc7a8b3..5615f8b 100644 --- a/src/core/info.cc +++ b/src/core/info.cc @@ -196,9 +196,11 @@ void Info::receive_server_update(std::istream &is) set_modelname(n); // read info text - clear_text(); size_t s; - is >> s; + if (!(is >> s)) + s = 0; + + clear_text(); for (size_t i = 0; (i < s) && is.good(); i++) { n.clear(); while ((is.get(c)) && (c != '"')); -- cgit v1.2.3