From: g0dil Date: Thu, 17 Jan 2008 13:44:20 +0000 (+0000) Subject: Packets: BUGFIX: next<> and prev<> now correctly handle in-valid() returns X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=be4e99b96b305cb8f8c6a00a0098392483089812;p=senf.git Packets: BUGFIX: next<> and prev<> now correctly handle in-valid() returns git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@617 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/Packet.cti b/Packets/Packet.cti index 18443fa..ed032da 100644 --- a/Packets/Packet.cti +++ b/Packets/Packet.cti @@ -69,14 +69,16 @@ template prefix_ OtherPacket senf::Packet::next() const { - return next().as(); + Packet p (next()) + return p ? p.as() : OtherPacket(); } template prefix_ OtherPacket senf::Packet::prev() const { - return prev().as(); + Packet p (prev()); + return p ? p.as() : OtherPacket(); } template