mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Oops, make 'return' GIB builtin actually end the current function.
This commit is contained in:
parent
90752b33fe
commit
2be8a851d5
3 changed files with 5 additions and 3 deletions
|
@ -48,7 +48,7 @@ typedef struct gib_buffer_data_s {
|
|||
struct gib_script_s *script;
|
||||
struct gib_tree_s *program, *ip;
|
||||
struct dstring_s *arg_composite;
|
||||
qboolean done, waitret;
|
||||
qboolean waitret;
|
||||
struct gib_sstack_s {
|
||||
struct gib_dsarray_s {
|
||||
struct dstring_s **dstrs;
|
||||
|
|
|
@ -104,7 +104,7 @@ GIB_Buffer_Reset (struct cbuf_s *cbuf)
|
|||
g->script = 0;
|
||||
g->program = g->ip = 0;
|
||||
g->stack.p = 0;
|
||||
g->waitret = g->done = false;
|
||||
g->waitret = false;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -278,12 +278,14 @@ GIB_Domain_Clear_f (void)
|
|||
Hash_FlushTable (GIB_Domain_Get (GIB_Argv (2)));
|
||||
}
|
||||
|
||||
static gib_tree_t fakeip = {0,0,0,0,0,0,0,0};
|
||||
|
||||
static void
|
||||
GIB_Return_f (void)
|
||||
{
|
||||
cbuf_t *sp = cbuf_active->up;
|
||||
|
||||
GIB_DATA (cbuf_active)->done = true;
|
||||
GIB_DATA (cbuf_active)->ip = &fakeip;
|
||||
|
||||
if (GIB_Argc () > 1 && sp && sp->interpreter == &gib_interp
|
||||
&& GIB_DATA (sp)->waitret) {
|
||||
|
|
Loading…
Reference in a new issue