delorie.com/archives/browse.cgi | search |
From: | "Stefan Viljoen" <Stefan_Viljoen AT excite DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: prog fails when run twice |
Date: | Sun, 30 Sep 2001 20:11:58 +0200 |
Organization: | The South African Internet Exchange |
Lines: | 21 |
Message-ID: | <9pabth$rc1$2@ctb-nnrp2.saix.net> |
References: | <5zKt7.4503$qi DOT 745588 AT news2-win DOT server DOT ntlworld DOT com> |
NNTP-Posting-Host: | pc53-01-p189.nt.saix.net |
X-Trace: | ctb-nnrp2.saix.net 1001960177 28033 155.239.176.189 (1 Oct 2001 18:16:17 GMT) |
X-Complaints-To: | abuse AT saix DOT net |
NNTP-Posting-Date: | 1 Oct 2001 18:16:17 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Brian Smith <graywolf DOT smith AT virgin DOT net> wrote in message news:5zKt7.4503$qi DOT 745588 AT news2-win DOT server DOT ntlworld DOT com... > I have a game prog I have written in C++ and ASM. > It involves large graphics files and small 'spites like' objects. The > graphic are constructed in a mem block set up by malloc. All changes (moves > etc) are completed here then the whole file is copied to the vidoe memory. > a 'newly complied' program runs fine but when it is run again, with > compling, the 'sprite' positions are wrong (out of position). > I have ran into this too - check you memory allocations and deallocations. Somewhere, you should find you forgot to dealloc something or you allocated something too small, and overran it when you wrote data to it. At least, that is what I was doing wrong... Stefan
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |