Mail Archives: djgpp/1996/06/15/10:57:16
Thinking furiously, Mark Habersack wrote:
> default:
> len += CharWidth(*walker++, curFont); // Here, the walker variable has
> // been everytime incremented
> // TWICE, not ONCE as it was
> // meant to be - what is wrong?
> }
>
> Later on I changed the offending line to
> len += CharWidth(*walker, curFont);
> walker++;
> and everything worked just fine. Where lies the error - is it my ignorance or
> a bug or side effect?
Is CharWidth a macro? I so, it's probably referring to it's first parameter
two (or more) times, thereby causing the postincrement to happen multiple
times.
Fred
--
-------------------------------------------------------------------------------
.---- Fred Smith / Office: fred AT computrition DOT com
( /__ ,__. __ __ / __ : / 508-663-2524
/ / / /__) / / /__) .+' Home: fredex AT fcshome DOT stoneham DOT ma DOT us
/ / (__ (___ (__(_ (___ / :__ 617-438-5471
-------------------------------- Jude 1:24,25 ---------------------------------
- Raw text -