Save work on loading object dictionaries - have a memory issue someplace.

This commit is contained in:
Michael R Sweet
2021-05-04 21:31:58 -04:00
parent 7afdfc725c
commit 4abb91ca24
8 changed files with 139 additions and 38 deletions

View File

@ -145,6 +145,12 @@ _pdfioValueRead(pdfio_file_t *pdf, // I - PDF file
v->type = PDFIO_VALTYPE_STRING;
v->value.string = pdfioStringCreate(pdf, token + 1);
}
else if (token[0] == '/')
{
// Name
v->type = PDFIO_VALTYPE_NAME;
v->value.name = pdfioStringCreate(pdf, token + 1);
}
else if (token[0] == '<')
{
// Hex string
@ -220,6 +226,8 @@ _pdfioValueRead(pdfio_file_t *pdf, // I - PDF file
v->value.indirect.number = (size_t)strtoimax(token, NULL, 10);
v->value.indirect.generation = (unsigned short)strtol(token2, NULL, 10);
PDFIO_DEBUG("_pdfioValueRead: Returning indirect value %lu %u R.\n", (unsigned long)v->value.indirect.number, v->value.indirect.generation);
return (v);
}
else