RE: Odd Loop

"Ammaross Danan" <[email protected]>
Newsgroups gmane.games.devel.mud.rom
Message-ID <[email protected]>
 

-----Original Message-----
    for (x = min; x < max; ++x) 
    { /* every row */
         for (y = min; y < max; ++y)
         { /* every column */
>if ( (y==min) || (map[x][y-1]!=map[x][y]) )


You'll want to be careful to do bounds-checking here. What if min = 0 in
this case?


Ammaross
www.rotf.net

-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.