aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/client/CL_input.java
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2005-06-07 12:57:21 +0000
committerHolger Zickner <[email protected]>2005-06-07 12:57:21 +0000
commit208726eafe79124ce581c52db6d5de164a611bd2 (patch)
tree7c00b3f3cc4e045d11c13543d1dd61141717d66c /src/jake2/client/CL_input.java
parent322270ce27ba041f360e12bb0cc98b8c7c128118 (diff)
replace Integer.parseInt() to prevent exceptions
Diffstat (limited to 'src/jake2/client/CL_input.java')
-rw-r--r--src/jake2/client/CL_input.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jake2/client/CL_input.java b/src/jake2/client/CL_input.java
index 5c47e61..3e5e4de 100644
--- a/src/jake2/client/CL_input.java
+++ b/src/jake2/client/CL_input.java
@@ -2,7 +2,7 @@
* java
* Copyright (C) 2004
*
- * $Id: CL_input.java,v 1.5 2005-01-21 01:10:09 cawe Exp $
+ * $Id: CL_input.java,v 1.6 2005-06-07 12:57:21 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -32,6 +32,7 @@ import jake2.game.cvar_t;
import jake2.game.usercmd_t;
import jake2.qcommon.*;
import jake2.sys.IN;
+import jake2.util.Lib;
import jake2.util.Math3D;
/**
@@ -109,7 +110,7 @@ public class CL_input {
c = Cmd.Argv(1);
if (c.length() > 0)
- k = Integer.parseInt(c);
+ k = Lib.atoi(c);
else
k = -1; // typed manually at the console for continuous down
@@ -130,7 +131,7 @@ public class CL_input {
// save timestamp
c = Cmd.Argv(2);
- b.downtime = Long.parseLong(c);
+ b.downtime = Lib.atoi(c);
if (b.downtime == 0)
b.downtime = Globals.sys_frame_time - 100;
@@ -144,7 +145,7 @@ public class CL_input {
c = Cmd.Argv(1);
if (c.length() > 0)
- k = Integer.parseInt(c);
+ k = Lib.atoi(c);
else {
// typed manually at the console, assume for unsticking, so clear
// all
@@ -298,7 +299,7 @@ public class CL_input {
}
static void IN_Impulse() {
- in_impulse = Integer.parseInt(Cmd.Argv(1));
+ in_impulse = Lib.atoi(Cmd.Argv(1));
}
/*