--- psiconv/trunk/lib/psiconv/parse_common.c 2004/02/22 22:24:39 217 +++ psiconv/trunk/lib/psiconv/parse_common.c 2004/02/28 17:09:03 238 @@ -314,17 +314,8 @@ goto ERROR4; } if ((temp == 0x06) || (i + leng == text_len)) { - if (!(para->text = malloc(sizeof(*(para->text)) * - (psiconv_list_length(line) + 1)))) + if (!(para->text = psiconv_unicode_from_list(line))) goto ERROR4; - for (j = 0; j < psiconv_list_length(line); j++) { - if (!(nextcharptr = psiconv_list_get(line,j))) { - psiconv_error(config,lev+2,off+i+len,"Internal data corruption"); - goto ERROR5; - } - para->text[j] = *nextcharptr; - } - para->text[j] = 0; if (!(str_copy = psiconv_make_printable(config,para->text))) goto ERROR5; @@ -580,7 +571,7 @@ psiconv_debug(config,lev+4,off+len,"Type: %02x",temp); for (j = 0; j < psiconv_list_length(anon_styles); j++) { if (!(anon_ptr = psiconv_list_get(anon_styles,j))) { - psiconv_error(config,lev+4,off+len,"Massive memory curruption"); + psiconv_error(config,lev+4,off+len,"Data structure corruption"); goto ERROR4; } if (temp == anon_ptr->nr) @@ -686,7 +677,7 @@ total = 0; for (i = 0; i < psiconv_list_length(result); i++) { if (!(para = psiconv_list_get(result,i))) { - psiconv_error(config,lev+3,off+len,"Massive memory corruption"); + psiconv_error(config,lev+3,off+len,"Data structure corruption"); goto ERROR4; } line_length = -1; @@ -791,7 +782,7 @@ for (i = 0 ; i < psiconv_list_length(anon_styles); i ++) { if (!(anon_ptr = psiconv_list_get(anon_styles,i))) { - psiconv_error(config,lev+4,off+len,"Massive memory corruption"); + psiconv_error(config,lev+4,off+len,"Data structure corruption"); goto ERROR2; } psiconv_free_character_layout(anon_ptr->character); @@ -833,7 +824,7 @@ ERROR3: for (i = 0; i < psiconv_list_length(anon_styles); i++) { if (!(anon_ptr = psiconv_list_get(anon_styles,i))) { - psiconv_error(config,lev+1,off,"Massive memory corruption"); + psiconv_error(config,lev+1,off,"Data structure corruption"); break; } psiconv_free_paragraph_layout(anon_ptr->paragraph);