Fix off-by-one-error :-)
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 1 Jan 2014 14:46:46 +0000 (14:46 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Wed, 1 Jan 2014 14:46:46 +0000 (14:46 +0000)
src/Capture/X11.hs

index b4e7bc7..b272675 100644 (file)
@@ -47,8 +47,8 @@ captureData = do
 
         let current_desktop = case desk_index of
               Nothing -> ""
-              Just n -> if 1 <= n && n <= length names
-                        then names !! (n-1)
+              Just n -> if 0 <= n && n < length names
+                        then names !! n
                         else show n
         -- Windows
         a <- internAtom dpy "_NET_CLIENT_LIST" False