diff --git a/src/platform/glad/gl.nim b/src/platform/glad/gl.nim index 8cf3130..fa7bfef 100644 --- a/src/platform/glad/gl.nim +++ b/src/platform/glad/gl.nim @@ -16237,8 +16237,8 @@ proc findCoreGL(glVersion: string) = version = version.replace(p) break - var major = ord(glVersion[0]) - ord('0') - var minor = ord(glVersion[2]) - ord('0') + var major = ord(version[0]) - ord('0') + var minor = ord(version[2]) - ord('0') glVersionMajor = major glVersionMinor = minor @@ -17861,8 +17861,8 @@ proc findCoreGLES2(glVersion: string) = version = version.replace(p) break - var major = ord(glVersion[0]) - ord('0') - var minor = ord(glVersion[2]) - ord('0') + var major = ord(version[0]) - ord('0') + var minor = ord(version[2]) - ord('0') glVersionMajor = major glVersionMinor = minor diff --git a/src/platform/glad/gles32_static.nim b/src/platform/glad/gles32_static.nim index 6c43b6f..5ed1825 100644 --- a/src/platform/glad/gles32_static.nim +++ b/src/platform/glad/gles32_static.nim @@ -5705,8 +5705,8 @@ proc findCoreGLES2(glVersion: string) = version = version.replace(p) break - var major = ord(glVersion[0]) - ord('0') - var minor = ord(glVersion[2]) - ord('0') + var major = ord(version[0]) - ord('0') + var minor = ord(version[2]) - ord('0') glVersionMajor = major glVersionMinor = minor