| delorie.com/archives/browse.cgi | search |
| From: | mdruiter AT cs DOT vu DOT nl (Ruiter de M) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: 0xB8000 |
| Date: | 5 Feb 1997 15:27:30 GMT |
| Organization: | Fac. Wiskunde & Informatica, VU, Amsterdam |
| Lines: | 20 |
| Message-ID: | <5da8t2$c3b@star.cs.vu.nl> |
| References: | <Pine DOT SUN DOT 3 DOT 91 DOT 970131092619 DOT 8698A-100000 AT rwd> |
| NNTP-Posting-Host: | sloep92.cs.vu.nl |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
: > void CApp::BuffUpdate(CWin *WItem)
: > {
: >
: > int x; // Current X Position
: > int y; // Current Y Position
: > int c; // Counter
: *snip*
: > if((Offender.Back==NULL) || (Ignore==TRUE))
: > {
: > *** video[(y*160)+x] = WItem->Front[c];
: > video[(y*160)+x+1] = WItem->Front[c+1];
: > }
: You forgot to initialize c to 0.
Now you see where forgetting -Wall (and maybe -W) can lead to :->
--
Groeten, Michel. http://www.cs.vu.nl/~mdruiter
\----/==\----/
\ / \ / "Life is cool.", Beavis.
\/ \/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |