File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -799,7 +799,7 @@ StaticGlShaders::GlslVersion StaticGlShaders::QueryGlslVersion() {
799799 /* scan the anything before the number */
800800 while (position<version_len) {
801801 char ch = cstr[position];
802- if ((ch >= ' 0' ) || (ch <= ' 9' )) {
802+ if ((ch >= ' 0' ) && (ch <= ' 9' )) {
803803 break ;
804804 }
805805 position++;
@@ -810,14 +810,15 @@ StaticGlShaders::GlslVersion StaticGlShaders::QueryGlslVersion() {
810810 int possible_major = 0 ;
811811 while (position<version_len) {
812812 char ch = cstr[position];
813- if ((ch >= ' 0' ) || (ch <= ' 9' )) {
813+ if ((ch >= ' 0' ) && (ch <= ' 9' )) {
814814 possible_major = (possible_major * 10 ) + ch - ' 0' ;
815815 }
816816 else if (ch == ' .' ) { /* got the minor */
817- position++;
818817 int possible_minor = 0 ;
818+ position++;
819819 while (position<version_len) {
820- if ((ch >= ' 0' ) || (ch <= ' 9' )) {
820+ ch = cstr[position];
821+ if ((ch >= ' 0' ) && (ch <= ' 9' )) {
821822 possible_minor = (possible_minor * 10 ) + ch - ' 0' ;
822823 }
823824 else break ;
You can’t perform that action at this time.
0 commit comments