summaryrefslogtreecommitdiff
path: root/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'charset.c')
-rw-r--r--charset.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/charset.c b/charset.c
index c502e90..90c4a04 100644
--- a/charset.c
+++ b/charset.c
@@ -42,16 +42,9 @@ void cCharSet::SetFromString(char *s, bool Enabled)
FREE(origcharset);
FREE(realcharset);
Free();
- enabled = Enabled;
- if (s[0] == '!')
- string = strdup(s + 1);
- else
- string = strdup(s);
- if (s[0] == '!' || s[0] == '#')
- enabled = false;
- char *p = (s[0] == '#') ? NULL : s;
- if (p) {
- char *p = (s[0] == '!') ? s+1 : s;
+ cListItem::SetFromString(s, Enabled);
+ if (enabled) {
+ char *p = (s[0] == '!') ? s + 1 : s;
char *r = strchr(p, ':');
if (r) {
*r = 0;