diff --git a/pdfio-dict.c b/pdfio-dict.c index 30de068..74123bd 100644 --- a/pdfio-dict.c +++ b/pdfio-dict.c @@ -518,7 +518,7 @@ _pdfioDictRead(pdfio_file_t *pdf, // I - PDF file _pdfio_value_t value; // Dictionary value - PDFIO_DEBUG("_pdfioDictRead(pdf=%p)\n", pdf); + PDFIO_DEBUG("_pdfioDictRead(pdf=%p, obj=%p, tb=%p, depth=%lu)\n", pdf, obj, tb, (unsigned long)depth); // Create a dictionary and start reading... if ((dict = pdfioDictCreate(pdf)) == NULL) @@ -530,6 +530,7 @@ _pdfioDictRead(pdfio_file_t *pdf, // I - PDF file if (!strcmp(key, ">>")) { // End of dictionary... + PDFIO_DEBUG("_pdfioDictRead: Returning dictionary value...\n"); return (dict); } else if (key[0] != '/') @@ -548,14 +549,14 @@ _pdfioDictRead(pdfio_file_t *pdf, // I - PDF file if (!_pdfioValueRead(pdf, obj, tb, &value, depth)) { - _pdfioFileError(pdf, "Missing value for dictionary key."); + _pdfioFileError(pdf, "Missing value for dictionary key '%s'.", key + 1); break; } if (!_pdfioDictSetValue(dict, pdfioStringCreate(pdf, key + 1), &value)) break; -// PDFIO_DEBUG("_pdfioDictRead: Set %s.\n", key); + PDFIO_DEBUG("_pdfioDictRead: Set %s.\n", key); } // Dictionary is invalid - pdfioFileClose will free the memory, return NULL