fix a silly braino in the resources code that was causing the resource

structs to not get linked into the chain
This commit is contained in:
Bill Currie 2002-04-09 16:06:05 +00:00
parent 9dd7deb798
commit 8588d2d1cd
2 changed files with 4 additions and 1 deletions

View file

@ -42,6 +42,7 @@ static const char rcsid[] =
#include "QF/console.h"
#include "QF/draw.h"
#include "QF/progs.h"
#include "QF/sys.h"
#include "QF/zone.h"
typedef struct {
@ -88,11 +89,13 @@ bi_InputLine_Create (progs_t *pr)
break;
}
if (!line) {
Sys_Printf ("out of resources\n");
G_INT (pr, OFS_RETURN) = 0;
return;
}
*line = Con_CreateInputLine (lines, size, prompt);
if (!*line) {
Sys_Printf ("failed to create inputline\n");
G_INT (pr, OFS_RETURN) = 0;
return;
}

View file

@ -81,7 +81,7 @@ PR_Resources_Register (progs_t *pr, const char *name, void *data,
res->data = data;
res->clear = clear;
res->next = pr->resources;
pr->resources = res->next;
pr->resources = res;
Hash_Add (pr->resource_hash, res);
}