Commit 2db5371c authored by Gwenole Beauchesne's avatar Gwenole Beauchesne Committed by Austin Yuan

Fix NVIDIA driver version string parser.

parent c88c6b36
...@@ -377,9 +377,16 @@ Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen, ...@@ -377,9 +377,16 @@ Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen,
*ddxDriverMajorVersion = v; *ddxDriverMajorVersion = v;
if (*(str = end) == '.') { if (*(str = end) == '.') {
v = strtoul(str + 1, &end, 10); v = strtoul(str + 1, &end, 10);
if (end && end != str && *end == '\0') { if (end && end != str && (*end == '.' || *end == '\0')) {
if (ddxDriverMinorVersion) if (ddxDriverMinorVersion)
*ddxDriverMinorVersion = v; *ddxDriverMinorVersion = v;
if (*(str = end) == '.') {
v = strtoul(str + 1, &end, 10);
if (end && end != str && *end == '\0') {
if (ddxDriverPatchVersion)
*ddxDriverPatchVersion = v;
}
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment