Commit: fix 2592, others


Subject: Commit: fix 2592, others
From: Dom Lachowicz (doml@appligent.com)
Date: Tue Jan 15 2002 - 09:59:50 CST


This is a potentially horrible bug in the formatter that I've hopefully
corrected, at least in fp_Line.cpp

The problem is this:

UT_uint32 count = vector.size();
for(UT_uint32 i = count -1; i >= 0; i--)

Now assume that count > 0. Everything works like a charm. Assume that
count == 0. Since 'i' is unsigned, its value is +4.2 billion and not -1.
This appeared in several places in the code and I've removed them.
Hopefully I got all of them, but I'm making no assurances.

This definitely fixes 2592 (a nice 105 page german document) and
potentially a few others. I'll go through bugzilla and retest.

Dom



This archive was generated by hypermail 2b25 : Tue Jan 15 2002 - 10:02:35 CST