-
Committer:
Matthieu Baerts
-
Date:
2014-10-13 09:42:11 UTC
-
Revision ID:
matttbe@gmail.com-20141013094211-5z2zsqrjo3pvcg51
X Mgr: a WM class can contain whitespaces (when devs don't respect rules...)
If there are whitespaces in the class, it will no longer be possible to find a dash char and then this code will cause a crash:
id_end = strrchr (str, '-');
*id_end = '\0';
Fixed by adding a if check and also by not end the string when there is a whitespace