diff options
author | Carsten Weisse <[email protected]> | 2005-07-10 17:53:24 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-07-10 17:53:24 +0000 |
commit | 1a98519e3371560fca9dc77cf828227d9ad2946e (patch) | |
tree | d454bfca66f9114dabef54606ea68ed7b4d34c3a /src/jake2/render/glconfig_t.java | |
parent | 07ba508bbbdc36aaa0fa635ad4f90849fa2eafdf (diff) |
set a default value (version 1.1)
if parsing fails too
Diffstat (limited to 'src/jake2/render/glconfig_t.java')
-rw-r--r-- | src/jake2/render/glconfig_t.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jake2/render/glconfig_t.java b/src/jake2/render/glconfig_t.java index 8e4f49c..2cb11a0 100644 --- a/src/jake2/render/glconfig_t.java +++ b/src/jake2/render/glconfig_t.java @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 20.11.2003 by RST. -// $Id: glconfig_t.java,v 1.2 2005-05-07 18:23:26 cawe Exp $ +// $Id: glconfig_t.java,v 1.2.6.1 2005-07-10 17:53:24 cawe Exp $ package jake2.render; @@ -36,7 +36,11 @@ public class glconfig_t { private float version = 1.1f; public void parseOpenGLVersion() { - version = Float.parseFloat(version_string.substring(0, 3)); + try { + version = Float.parseFloat(version_string.substring(0, 3)); + } catch (Exception e) { + version = 1.1f; + } } public float getOpenGLVersion() { |