summaryrefslogtreecommitdiffstats
path: root/src/jake2/client/SCR.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/client/SCR.java
parent48a610b869b67b56c9450a2264165f614064fb55 (diff)
now it works without null and handles empty strings correctly
Diffstat (limited to 'src/jake2/client/SCR.java')
-rw-r--r--src/jake2/client/SCR.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jake2/client/SCR.java b/src/jake2/client/SCR.java
index 9e263a1..7e27e3e 100644
--- a/src/jake2/client/SCR.java
+++ b/src/jake2/client/SCR.java
@@ -2,7 +2,7 @@
* SCR.java
* Copyright (C) 2003
*
- * $Id: SCR.java,v 1.11 2005-01-23 19:16:17 cawe Exp $
+ * $Id: SCR.java,v 1.12 2005-01-23 20:04:06 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -896,7 +896,8 @@ public final class SCR extends Globals {
Com.ParseHelp ph = new Com.ParseHelp(s);
- while ((token = Com.Parse(ph)) != null) {
+ while (!ph.isEof()) {
+ token = Com.Parse(ph);
if (token.equals("xl")) {
token = Com.Parse(ph);
x = Lib.atoi(token);
@@ -1127,7 +1128,7 @@ public final class SCR extends Globals {
value = cl.frame.playerstate.stats[Lib.atoi(token)];
if (value == 0) {
// skip to endif
- while ((token = Com.Parse(ph)) != null && !token.equals("endif"));
+ while (!ph.isEof() && !(token = Com.Parse(ph)).equals("endif"));
}
continue;
}