X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FDefaultBundle%2FListOptionTypeParser.cti;h=148ec5d122108100b61da69dbaa5db301b021969;hb=225f601ae7b61c510ccd9596e80aa6cf9cc7cbbe;hp=2a3bdeccc48530267e4c39069a1dd46894c78fda;hpb=d32839093a6d081dfbc26afe22c1e999037d6c75;p=senf.git diff --git a/senf/Packets/DefaultBundle/ListOptionTypeParser.cti b/senf/Packets/DefaultBundle/ListOptionTypeParser.cti index 2a3bdec..148ec5d 100644 --- a/senf/Packets/DefaultBundle/ListOptionTypeParser.cti +++ b/senf/Packets/DefaultBundle/ListOptionTypeParser.cti @@ -1,4 +1,4 @@ -// $Id: ListOptionTypeParser.cti 869 2008-06-09 13:57:27Z pug $ +// $Id$ // // Copyright (C) 2009 // Fraunhofer Institute for Open Communication Systems (FOKUS) @@ -44,7 +44,7 @@ template prefix_ senf::detail::ListOptionTypeParser_Policy:: ListOptionTypeParser_Policy(Arg const & arg) - : AuxPolicy(arg) + : AuxPolicy(arg) {} template @@ -88,7 +88,7 @@ template prefix_ senf::detail::ListOptionTypeParser_Policy::container_policy:: container_policy(parser_policy const & p) - : AuxPolicy(p) + : AuxPolicy(p) {} //destructor @@ -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