X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FDefaultBundle%2FListOptionTypeParser.cti;h=2dad6d2d01b0bd5d5392e5b143b913d0c57a8279;hb=394ced7000128fef7e753caea1deda8d55dec8e2;hp=81266cfba0a16471905d561b54b02c4d44d3f773;hpb=9cb871b939efe93e35dd96808d25089399acfc46;p=senf.git diff --git a/senf/Packets/DefaultBundle/ListOptionTypeParser.cti b/senf/Packets/DefaultBundle/ListOptionTypeParser.cti index 81266cf..2dad6d2 100644 --- a/senf/Packets/DefaultBundle/ListOptionTypeParser.cti +++ b/senf/Packets/DefaultBundle/ListOptionTypeParser.cti @@ -28,9 +28,9 @@ // Custom includes #define prefix_ inline -///////////////////////////////cti.p/////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::detail::ListOptionTypeParser_Policy template @@ -80,7 +80,7 @@ senf::detail::ListOptionTypeParser_Policy::init(data_it AuxPolicy::aux(0, i, s); } -/////////////////////////////////////////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::detail::ListOptionTypeParser_Policy //constructor @@ -108,7 +108,11 @@ construct(container_type & c) realAux_ = (AuxPolicy::aux(i, c.state()) * 8) + 6; safe_data_iterator e = i + realAux_; for (n_ = 0; i != e;) { - unsigned int elByte = senf::bytes(ElementParser(i, c.state())); + size_type elByte; + if (i[0] == 0u) + elByte = 1; + else + elByte = senf::bytes(ElementParser(i, c.state())); if (((i + elByte) == e) && (i[0] == 0u || i[0] == 1u)) { //check weather last element is padding or not realAux_ -= std::distance(i, e); c.data().erase(i, e); //delete padding @@ -278,7 +282,7 @@ raw(container_type const & c, iterator_data const & d) return container_type::iterator::get(d).i(); } -///////////////////////////////cti.e/////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_