Print Page | Close Window

Bug report: NewStaticOutline

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1464
Printed Date: 23 Nov 24 at 7:53AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Bug report: NewStaticOutline
Posted By: IanK
Subject: Bug report: NewStaticOutline
Date Posted: 01 Jun 10 at 11:35AM
My company's just purchased a "with source" update to our old iSEDQuickPDF library, and I'm currently going through our old (antique!) code and checking everything builds and works with the new library linked in.

In the course of this I've found what I'm 99.9% sure is a glitch in the NewStaticOutline method; in v7.19 the meat of this function is:

  if ValidOutlineID(Parent) then
  begin
    Result := [Stuff - removed to preserve copyright];
  end else
    Result := 0;


...which fails (returns 0) if a Parent value of 0 (= add root, rather than child, StaticOutline element) is specified as ValidOutlineID doesn't regard 0/Nil as a valid memory location.

The fix for this is - I think - to add the additional condition to the if statement so it becomes:

  if (Parent = 0) or ValidOutlineID(Parent) then

That line, with the additional condition, is already in place in the very similar NewOutline method.

Cheers,
Ian

P.S. Hope this is the right place for a bug report - couldn't see anywhere specific for them on the web page or in the forums.



Replies:
Posted By: Rowan
Date Posted: 01 Jun 10 at 11:38AM
Hi Ian,

Please report your bug on the page below.

http://www.quickpdflibrary.com/support/report-bug.php - http://www.quickpdflibrary.com/support/report-bug.php

Cheers,
- Rowan.


Posted By: IanK
Date Posted: 01 Jun 10 at 11:47AM
Done, Rowan - will do the same for the documentation omission I just raised too! Smile



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk