if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) &&
retvalue.addr != NULL) {
+ g_strstrip(retvalue.addr);
*value = retvalue.addr;
ret = TRUE;
}
if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) &&
retvalue.addr != NULL) {
- RrColor *c = RrColorParse(inst, retvalue.addr);
+ /* strip leading/trailing whitespace, but the returned value is
+ inside the X db and we are not to modify it, so we must make a copy
+ */
+ RrColor *c;
+
+ g_strstrip(retvalue.addr);
+ c = RrColorParse(inst, retvalue.addr);
if (c != NULL) {
*value = c;
ret = TRUE;