diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Input.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Input.cc b/lib/Input.cc index f246f73..9697913 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -90,6 +90,9 @@ Input::Input(const String & no) throw (GeneralException) : seek(0, SEEK_SET); } } else { +#ifdef DEBUG + std::cerr << "Opening file in archive, position " << results.ptr << std::endl; +#endif size = results.size; seek(results.ptr, SEEK_SET); size = readU32(); @@ -382,11 +385,19 @@ void Archive::FileTree::touched() { int Archive::FileTree::compute_ptrs(size_t cptr) { ptr = cptr; +#ifdef DEBUG + std::cerr << "Computed pointer for `" << name << "' = " << ptr << std::endl; + if (child) + std::cerr << "Node has child\n"; + else + std::cerr << "Node is " << size << " bytes large.\n"; +#endif + if (child) { FileTree * p; size = 0; for (p = child; p; p = p->next) { - size += p->compute_ptrs(ptr + size) - ptr; + size = p->compute_ptrs(ptr + size) - ptr; } } |