… | |
… | |
245 | if (len) { |
245 | if (len) { |
246 | if (!(text = malloc(sizeof (*text) * (len + 1)))) { |
246 | if (!(text = malloc(sizeof (*text) * (len + 1)))) { |
247 | fputs("Out of memory error\n",stderr); |
247 | fputs("Out of memory error\n",stderr); |
248 | exit(1); |
248 | exit(1); |
249 | } |
249 | } |
250 | memcpy(text,para->text+charnr,len * sizeof(*text)); |
250 | memcpy(text,para->text+start,len * sizeof(*text)); |
251 | text[len] = 0; |
251 | text[len] = 0; |
252 | characters(config,list,text,layout->layout,enc); |
252 | characters(config,list,text,layout->layout,enc); |
253 | free(text); |
253 | free(text); |
254 | } |
254 | } |
255 | charnr += layout->length; |
255 | charnr += layout->length; |