1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

don't crash with themes without replaces block. don't crash with themes with

highascii characters.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1422 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-03-24 16:03:05 +00:00 committed by cras
parent fa82a26cc6
commit 7ed4e7ee7c

View File

@ -161,7 +161,7 @@ static void theme_format_append_next(THEME_REC *theme, GString *str,
int flags)
{
int index;
char chr;
unsigned char chr;
chr = **format;
if ((chr == '$' || chr == '%') &&
@ -481,14 +481,14 @@ static void theme_read_replaces(CONFIG_REC *config, THEME_REC *theme)
const char *p;
int index;
node = config_node_traverse(config, "replaces", FALSE);
if (node == NULL || node->type != NODE_TYPE_BLOCK) return;
/* reset replace keys */
for (index = 0; index < 256; index++)
theme->replace_keys[index] = -1;
index = 0;
node = config_node_traverse(config, "replaces", FALSE);
if (node == NULL || node->type != NODE_TYPE_BLOCK) return;
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
node = tmp->data;