summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-08-13 14:43:09 +0000
committerAustin Yuan <shengquan.yuan@intel.com>2009-09-03 11:08:34 +0800
commit2db5371c30e7636e0d6d8794c2c67187020760d2 (patch)
treea7478813cc9de3ec232a3ce06073edcfc8f76073
parentc88c6b3673413cbfb09263971b188a86303c0750 (diff)
Fix NVIDIA driver version string parser.
-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;
+ }
+ }
}
}
}