aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/qcommon/Com.java
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2005-01-23 20:04:06 +0000
committerCarsten Weisse <[email protected]>2005-01-23 20:04:06 +0000
commite39c6f05a296e872b4b4dd024913c67dfdc9c19f (patch)
treecd004552513792662cd73281ed4b0f784bb1be5e /src/jake2/qcommon/Com.java
parent48a610b869b67b56c9450a2264165f614064fb55 (diff)
now it works without null and handles empty strings correctly
Diffstat (limited to 'src/jake2/qcommon/Com.java')
-rw-r--r--src/jake2/qcommon/Com.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jake2/qcommon/Com.java b/src/jake2/qcommon/Com.java
index ebd35ee..c8d7117 100644
--- a/src/jake2/qcommon/Com.java
+++ b/src/jake2/qcommon/Com.java
@@ -2,7 +2,7 @@
* Com.java
* Copyright (C) 2003
*
- * $Id: Com.java,v 1.9 2005-01-23 18:58:11 cawe Exp $
+ * $Id: Com.java,v 1.10 2005-01-23 20:04:02 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -207,14 +207,16 @@ public final class Com
int len = 0;
if (hlp.data == null) {
- return null;
+ return "";
}
while (true) {
// skip whitespace
hlp.skipwhites();
- if (hlp.isEof())
- return null;
+ if (hlp.isEof()) {
+ hlp.data = null;
+ return "";
+ }
// skip // comments
if (hlp.getchar() == '/') {