From: XXguille AT XXiies DOT XXes (Guillermo Rodriguez Garcia) Newsgroups: comp.os.msdos.djgpp Subject: Re: Odd problem... Date: Wed, 19 May 1999 20:12:25 GMT Organization: Telefonica Transmision de Datos Lines: 27 Message-ID: <37438cce.2247095@noticias.iies.es> References: <19990519053901232 DOT AAA56 DOT 87 AT mike-s-toy> NNTP-Posting-Host: iies252.iies.es Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Forte Agent 1.5/32.451 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com El día Wed, 19 May 1999 00:31:36 -0500, "Roy Taylor" escribió: >I have run into a tricky problem while writing a polygon draw function. It >seems to work fine in real mode under my MS compiler (but that won't cut it That just shows how bad MS is :-) [...] > for(i=0;i<=200;i++) > { > ScreenClip.Start[i]=0;ScreenClip.End[i]=320; > } You are overrunning the array, which only has 200 positions. You are writing from 0 to 200, that is, 201 values; the six Point objects are declared just below the HLineList, so when you do this you overwrite the points, thus getting incorrect values. BTW: the values you get are the same each time you run this program, povided you don't change any compiler options. Regards, GUILLE ---- Guillermo Rodriguez Garcia XXguille AT XXiies DOT XXes (ya sabes :-)