From aa4d1f5c90c9d9cc8ad8b9addd969e87795726ea Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 27 Jul 2003 21:45:53 +0000 Subject: [PATCH] be sure to clear com_token when end of file is hit --- libs/util/idparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/util/idparse.c b/libs/util/idparse.c index 8bb1267e2..345a3d73a 100644 --- a/libs/util/idparse.c +++ b/libs/util/idparse.c @@ -107,8 +107,11 @@ COM_Parse (const char *data) skipwhite: while (isspace ((byte) *data)) data++; - if (!*data) + if (!*data) { + dstring_clearstr (_com_token); + com_token = _com_token->str; return 0; + } if (data[0] == '/' && data[1] == '/') { while (*data && *data != '\n') data++;