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

@ -727,6 +727,8 @@ _pdfioDictSetValue(
_pdfio_pair_t *pair; // Current pair
PDFIO_DEBUG("_pdfioDictSetValue(dict=%p, key=\"%s\", value=%p)\n", dict, key, (void *)value);
// See if the key is already set...
if (dict->num_pairs > 0)
{
@ -765,6 +767,11 @@ _pdfioDictSetValue(
if (dict->num_pairs > 1)
qsort(dict->pairs, dict->num_pairs, sizeof(_pdfio_pair_t), (int (*)(const void *, const void *))compare_pairs);
#ifdef DEBUG
PDFIO_DEBUG("_pdfioDictSetValue: %lu pairs\n", (unsigned long)dict->num_pairs);
PDFIO_DEBUG_DICT(dict, "_pdfioDictSetValue");
#endif // DEBUG
return (true);
}