Whoops. I broke looping under some circumstances in GIB. Fixed.

This commit is contained in:
Brian Koropoff 2002-08-28 08:28:05 +00:00
parent 33d132fc4e
commit 7cc9f48207

View file

@ -241,8 +241,12 @@ GIB_Parse_Extract_Line (struct cbuf_s *cbuf)
dstring_snip (dstr, 0, i + (dstr->str[i] == '\n' || dstr->str[i] == ';'));
}
return;
// If this is a looping buffer and it is now empty,
// copy the loop program back in
if (GIB_DATA(cbuf)->type == GIB_BUFFER_LOOP && !cbuf->buf->str[0])
Cbuf_AddText (cbuf, GIB_DATA(cbuf)->loop_program->str);
return;
}
/*
@ -483,11 +487,5 @@ void GIB_Parse_Execute_Line (cbuf_t *cbuf)
} else
Cmd_Command (cbuf->args);
dstring_clearstr (cbuf->line);
// If this is a looping buffer and it is now empty,
// copy the loop program back in and execute any
// loop callbacks
if (GIB_DATA(cbuf)->type == GIB_BUFFER_LOOP && !cbuf->buf->str[0])
Cbuf_AddText (cbuf, GIB_DATA(cbuf)->loop_program->str);
}