mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-05 09:38:40 +00:00
initialize enc->unicode when there are too few elements
This commit is contained in:
parent
90d7bbc9ce
commit
4859a74819
|
@ -227,6 +227,13 @@ void ffw_reencode_raw(int32 * mapping, int mapping_len, int force)
|
||||||
enc->char_cnt = len;
|
enc->char_cnt = len;
|
||||||
enc->unicode = (int32_t*)malloc(len * sizeof(int32_t));
|
enc->unicode = (int32_t*)malloc(len * sizeof(int32_t));
|
||||||
memcpy(enc->unicode, mapping, mapping_len * sizeof(int32_t));
|
memcpy(enc->unicode, mapping, mapping_len * sizeof(int32_t));
|
||||||
|
if(mapping_len < 256)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for(i = mapping_len; i < 256; ++i)
|
||||||
|
enc->unicode[i] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
enc->enc_name = strcopy("");
|
enc->enc_name = strcopy("");
|
||||||
|
|
||||||
enc->next = enc_head;
|
enc->next = enc_head;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user