From: g0dil Date: Thu, 14 Feb 2008 09:18:32 +0000 (+0000) Subject: Packets: BUGFIX: Fix bad FlagParser offset calculation X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=e59da064ee0ae6cc18c7e1173eedb920d5023021;p=senf.git Packets: BUGFIX: Fix bad FlagParser offset calculation git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@696 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/IntParser.hh b/Packets/IntParser.hh index 5753021..fe3de03 100644 --- a/Packets/IntParser.hh +++ b/Packets/IntParser.hh @@ -426,8 +426,8 @@ namespace senf { value_type value() const { return i()[Bit/8] & (1<<(7-(Bit%8))); } void value(value_type v) { - if (v) i()[0] |= 1<<(7-(Bit%8)); - else i()[0] &= ~(1<<(7-(Bit%8))); + if (v) i()[Bit/8] |= 1<<(7-(Bit%8)); + else i()[Bit/8] &= ~(1<<(7-(Bit%8))); } FlagParser const & operator= (value_type other) { value(other); return *this; } };