On Wed, 8 Oct 1997 20:19:36 +0200 Frank Heckenbach heckenb@mi.uni-erlangen.de wrote:
Maurice Lombardi wrote:
There is another error in this initialization part (which presumably has nothing to do with the crash of the compiler). The variable ppJunk is New'ed, used to fill CmdLine, which is a pointer of pChar type, Then Dispose'd. So the memory to which CmdLine points is reputted into the heap, and can be overwrited by subsequent instructions in the main program.
Fixed!
Unfortunately, there are similar bugs (at least) in the functions Str2PChar (in System.pas) and Int2PChar (GPCUtil.pas). I hope they will be fixed in the next release.
I can see the problemwith Int2pChar (I have fixed it now, by copying the string to the result ( with "StrNew()" ) instead of just assigning it (the user has to free the memory afterwards - with "StrDispose()").
However, I fail to see the problem with Str2pChar. It works correctly in all my tests (at least, under BP7, BPW, Delphi 1 and Delphi 2).
Best regards, The Chief Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant) Author of: Chief's Installer Pro v4.01 for Win16 and Win32. Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ E-mail: laa12@keele.ac.uk