summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-05-31 11:16:01 +0200
committerSven Gothel <[email protected]>2013-05-31 11:16:01 +0200
commitcbd7bf1d65a253381b0775d57c0c949c75aef008 (patch)
tree3dc0c44cfba319fef78e17860f7fdf993e4fff7d /src/jogl/classes/jogamp/opengl/GLVersionNumber.java
parentef8949d4bdfb21bbe423acc661affaf59369f859 (diff)
GLVersionNumber.createVendorVersion(): Only test match result and potentially continue matching if having a pattern-match (don't loop for-ever).
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLVersionNumber.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLVersionNumber.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLVersionNumber.java b/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
index 0ce34a60d..cea3ac4ab 100644
--- a/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
+++ b/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
@@ -115,10 +115,15 @@ public class GLVersionNumber extends VersionNumberString {
while ( str.length() > 0 ) {
final VersionNumberString version = new VersionNumberString(str, getDefaultVersionNumberPattern());
- if( version.hasMajor() && version.hasMinor() ) { // Requires at least a defined major and minor version component!
- return version;
+ final int eosm = version.endOfStringMatch();
+ if( 0 < eosm ) {
+ if( version.hasMajor() && version.hasMinor() ) { // Requires at least a defined major and minor version component!
+ return version;
+ }
+ str = str.substring( eosm );
+ } else {
+ break; // no match
}
- str = str.substring(version.endOfStringMatch());
}
return VersionNumberString.zeroVersion;
}