diff options
author | Carsten Weisse <[email protected]> | 2005-01-23 18:58:11 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-01-23 18:58:11 +0000 |
commit | 15ce2480f654e9c3abd7d250dfa2ae7031056d22 (patch) | |
tree | ce2ea34a018e3e1f8ce6beb33c233ddcc4ed526b /src/jake2/qcommon | |
parent | 9f344205cf045f8b0755d91f71ba2a7771dce7d5 (diff) |
bugfix: if no more tokens are available then return null
Diffstat (limited to 'src/jake2/qcommon')
-rw-r--r-- | src/jake2/qcommon/Com.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jake2/qcommon/Com.java b/src/jake2/qcommon/Com.java index 697d0b9..ebd35ee 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.8 2005-01-23 01:18:28 cawe Exp $ + * $Id: Com.java,v 1.9 2005-01-23 18:58:11 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -207,20 +207,21 @@ public final class Com int len = 0; if (hlp.data == null) { - return ""; + return null; } while (true) { // skip whitespace hlp.skipwhites(); if (hlp.isEof()) - return ""; + return null; // skip // comments if (hlp.getchar() == '/') { if (hlp.nextchar() == '/') { hlp.skiptoeol(); - return ""; + // goto skip whitespace + continue; } else { hlp.prevchar(); break; |