From e16a211e1f18dc2e49de322fded57d7ae94b3bae Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 24 Apr 2003 04:57:30 +0000 Subject: [PATCH] PR_SetString doesn't like null pointers, it seems. While fixing PR_SetString would be a better fix, this is faster code. --- libs/gamecode/builtins/bi_qfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/gamecode/builtins/bi_qfile.c b/libs/gamecode/builtins/bi_qfile.c index c03bf51dd..569a62be8 100644 --- a/libs/gamecode/builtins/bi_qfile.c +++ b/libs/gamecode/builtins/bi_qfile.c @@ -154,7 +154,10 @@ bi_Qgetline (progs_t *pr) const char *s; s = Qgetline (*h); - RETURN_STRING (pr, s); + if (s) + RETURN_STRING (pr, s); + else + R_STRING (pr) = 0; } static void