mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
Apply a couple of patches from calim of nouveau.
One's an actual bug, the other a bit of error checking (not sure how necessary it is, but it's in code that we don't /want/ to run, so it can't hurt :)
This commit is contained in:
parent
e167300a84
commit
a7870a98a1
2 changed files with 5 additions and 2 deletions
|
@ -432,8 +432,11 @@ Sys_Error (const char *error, ...)
|
|||
static int in_sys_error = 0;
|
||||
|
||||
if (in_sys_error) {
|
||||
size_t cnt;
|
||||
const char *msg = "\nSys_Error: recursive error condition\n";
|
||||
write (2, msg, strlen (msg));
|
||||
cnt = write (2, msg, strlen (msg));
|
||||
if (cnt < 0)
|
||||
perror ("write failed");
|
||||
abort ();
|
||||
}
|
||||
in_sys_error = 1;
|
||||
|
|
|
@ -256,7 +256,7 @@ PF_newstr (progs_t *pr)
|
|||
int s = dstr->size;
|
||||
dstr->size = P_FLOAT (pr, 1) + 1;
|
||||
dstring_adjust (dstr);
|
||||
memset (dstr->str + s, dstr->size - s, 0);
|
||||
memset (dstr->str + s, 0, dstr->size - s);
|
||||
}
|
||||
|
||||
R_STRING (pr) = i;
|
||||
|
|
Loading…
Reference in a new issue