From cd5fd2efaa1867932daf467ed7a64f4928e3578a Mon Sep 17 00:00:00 2001 From: schodet Date: Sun, 21 May 2006 00:24:46 +0000 Subject: Bouh, l'horible bug. --- i/marvin/src/proto/proto.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/i/marvin/src/proto/proto.cc b/i/marvin/src/proto/proto.cc index 3569a47..07a6634 100644 --- a/i/marvin/src/proto/proto.cc +++ b/i/marvin/src/proto/proto.cc @@ -170,7 +170,6 @@ bool Proto::decode (const Frame &frame, const char *format, int &a0, int &a1, int &a2) { - int dummy; return decode(frame, format, a0, a1, a2, dummy); } @@ -398,12 +397,15 @@ Proto::decodeArg(const Frame & frame, const char *format, int &a0, int &a1, int break; case 'D': - int8_t t = static_cast(frame.args[pos]); - temp[i] = static_cast(t) << 24 - |static_cast(frame.args[pos + 1]) << 16 - |static_cast(frame.args[pos + 2]) << 8 - |static_cast(frame.args[pos + 3]); - break; + { + int8_t t = static_cast(frame.args[pos]); + temp[i] = static_cast(t) << 24 + |static_cast(frame.args[pos + 1]) << 16 + |static_cast(frame.args[pos + 2]) << 8 + |static_cast(frame.args[pos + 3]); + pos += 4; + break; + } } } a0 = temp[0]; -- cgit v1.2.3