Small bug in TCP_Rewriter

[catching up on some old threads - apologies for the delay]

perhaps ..

         if(!next_packet->AppendData(data, left))
         { ASSERT(0); }

Thanks, that looks like the correct fix. I've added this.

By the way, does anyone know whether ASSERT() is guaranteed to be equivalent
to a statement, so that the {}'s above can be safely omitted?

Plz. let me know if this isn't the appropriate forum for submitting bugs.

This is a fine forum for doing so (with again my apologies for the delay
in following up).

    Vern

Mhmm avoid the problem by saying

  int success = next_packet->AppendData(data, left);
  ASSERT(success);
?

Cheers,
Christian.

[catching up on some old threads - apologies for the delay]

perhaps ..

        if(!next_packet->AppendData(data, left))
        { ASSERT(0); }
     

Thanks, that looks like the correct fix. I've added this.

By the way, does anyone know whether ASSERT() is guaranteed to be equivalent
to a statement, so that the {}'s above can be safely omitted?
   

  if(statement)
    ;

Is valid C so the braces shouldn't be necessary.

I don't see anywhere in the standard that assert is guaranteed to
be a statement ...

.m