diff options
author | Carsten Weisse <[email protected]> | 2005-02-08 18:00:02 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-02-08 18:00:02 +0000 |
commit | 706ef6da52451c301f3d9d5735013264e2bf67cd (patch) | |
tree | 63efb83030838dc9e456240de5c04b72c48b140b /src | |
parent | ee62e5f9ad5761d812d31ea3b5099a80cad6a836 (diff) |
a better test for empty strings
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/game/SuperAdapter.java | 4 | ||||
-rw-r--r-- | src/jake2/qcommon/Cvar.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/jake2/game/SuperAdapter.java b/src/jake2/game/SuperAdapter.java index 140c3cf..bfbf7db 100644 --- a/src/jake2/game/SuperAdapter.java +++ b/src/jake2/game/SuperAdapter.java @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 09.01.2004 by RST. -// $Id: SuperAdapter.java,v 1.6 2005-02-06 19:15:07 salomo Exp $ +// $Id: SuperAdapter.java,v 1.7 2005-02-08 17:58:46 cawe Exp $ package jake2.game; @@ -73,7 +73,7 @@ public class SuperAdapter { public SuperAdapter() { StackTraceElement tr[]= new Throwable().getStackTrace(); adapterid= tr[2].getClassName(); - if (adapterid == "") + if (adapterid.length() == 0) new Throwable("error in creating an adapter id!").printStackTrace(); else register(this, adapterid); diff --git a/src/jake2/qcommon/Cvar.java b/src/jake2/qcommon/Cvar.java index c62c4b9..d14cadd 100644 --- a/src/jake2/qcommon/Cvar.java +++ b/src/jake2/qcommon/Cvar.java @@ -2,7 +2,7 @@ * Cvar.java * Copyright (C) 2003 * - * $Id: Cvar.java,v 1.6 2004-10-21 03:11:30 cawe Exp $ + * $Id: Cvar.java,v 1.7 2005-02-08 18:00:02 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -358,7 +358,7 @@ public class Cvar extends Globals { cvar_t var; for (var = Globals.cvar_vars; var != null; var = var.next) { - if (var.latched_string == null || var.latched_string == "") + if (var.latched_string == null || var.latched_string.length() == 0) continue; var.string = var.latched_string; var.latched_string = null; |