Commit 4774f588 authored by c.rhodes's avatar c.rhodes
Browse files

robustify get-wm-class

Problem and test code from Shawn Betts <sabetts@gmail.com>

darcs-hash:20081030154635-dc3a5-2ae47bfda0609c6e5e4737c273f3b6c4033425ba.gz
parent 5e384dd8
......@@ -61,7 +61,10 @@
(when value
(let* ((name-len (position 0 (the (vector card8) value)))
(name (subseq (the (vector card8) value) 0 name-len))
(class (subseq (the (vector card8) value) (1+ name-len) (1- (length value)))))
(class
(when name-len
(subseq (the (vector card8) value) (1+ name-len)
(position 0 (the (vector card8) value) :start (1+ name-len))))))
(values (and (plusp (length name)) (map 'string #'card8->char name))
(and (plusp (length class)) (map 'string #'card8->char class)))))))
......
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