Mail Archives: djgpp/1994/10/06/00:59:55
PH> it works! And it works as I wanted it to. If I comment out the printf...
PH> stuff then it will compile the same but crash. (SomeFunction() doesn't
PH> print anything out.) This seems almost unbelievable - I can't imagine
PH> why having a printf call can affect anything! Can anyone help me out
PH> here? This is with version 1.12m2.
Whenever I see this sort of thing happening, I always think "I must have
screwed up a pointer somewhere." If you change your code in what looks to be
a superficial manner, stuff will be moved around, and now instead of overwriting
a crucial instruction, you're overwriting something about how printf() deals with
padding hexidecimal numbers or some other rubbish that you never happen to use.
(or, even better, you just overwrite some data that you didn't even know stdio.h
declared as global and nothing important uses anyways.)
That would be my guess..
- Raw text -