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

robustify get-wm-class

Problem and test code from Shawn Betts <>

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)))))
(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