summaryrefslogtreecommitdiff
path: root/src/x11/va_nvctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11/va_nvctrl.c')
-rw-r--r--src/x11/va_nvctrl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/x11/va_nvctrl.c b/src/x11/va_nvctrl.c
index 46fcca5..b14db47 100644
--- a/src/x11/va_nvctrl.c
+++ b/src/x11/va_nvctrl.c
@@ -377,9 +377,16 @@ Bool VA_NVCTRLGetClientDriverName( Display *dpy, int screen,
*ddxDriverMajorVersion = v;
if (*(str = end) == '.') {
v = strtoul(str + 1, &end, 10);
- if (end && end != str && *end == '\0') {
+ if (end && end != str && (*end == '.' || *end == '\0')) {
if (ddxDriverMinorVersion)
*ddxDriverMinorVersion = v;
+ if (*(str = end) == '.') {
+ v = strtoul(str + 1, &end, 10);
+ if (end && end != str && *end == '\0') {
+ if (ddxDriverPatchVersion)
+ *ddxDriverPatchVersion = v;
+ }
+ }
}
}
}