Re: Printf fn=-1 and it still works

new topic     » goto parent     » topic index » view thread      » older message » newer message

Daniel Kluss wrote:
> I have to say that I would expect an error, but that is just weird that it
> works.
> If you open a file for reading and you use printf it complains though.
> I'm using exw.exe if that makes a difference.

That's a bug. Thanks.
printf(-1, ...) doesn't really "work".
It just doesn't give an error like it should.
No output is produced.

It's easy to fix. -2, +3 etc. all give errors.
-1 is a special case in the printf code. It's not handled right.
puts(-1, ...) correctly gives an error.

Thanks,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu