[lazarus] Patches to Shanes files

P Jean dit Bailleul jeanditbailleulp at em.agr.ca
Thu Jul 8 14:34:35 EDT 1999


At 13:59 08/07/99 -0400, you wrote:
>P Jean dit Bailleul wrote:
>> 
>> If this work but not the StrPCopy, there some bug in the StrPCopy
>> implementation since it should be the same in both. an other try you
>> could is add a null (#0) char at the end of the string, then do the
>> StrPCopy
>
>That was exactly our point. The problem is when we try to make a simple
>sample program, StrPCopy works correctly. So this means that something
>else is stomping on memory someplace and StrPCopy just happens to be
>what gets affected.   :-\

StrPCopy should use the length of the String variable and not until an #0
is found since it convert from String to Array of Char (PChar). But the
length of the variable is correct (previous tests). If adding an #0 to the
end of the string variable solve the problem it mean that StrPCopy is not
implemented the way it should be. If it does not solve the problem, the
memory gets corrupted from some where else during the call to corrupt the
data. An other problem can that the program is corrupted in memory by a
wrong acces (is it possible under Linux?, I'm too beginner to know this :-(


JDB

les opinions et recommandations exprimées dans ce courrier sont ceux de
l'auteur, ils ne sont pas nécessairement endossés par Agritulture et
AgroAlimentaire Canada
--------------------------------------------------------------
Philippe JEAN DIT BAILLEUL
Agriculture & AgroAlimentaire Canada - Agriculture & AgriFood Canada
Email : JeanDitBailleulP at em.agr.ca
Web : Http://res.agr.ca/swinenet/porcexpert/jeanditbailleulp
Tel : +1 (819) 565 9174 poste 251
Fax : +1 (819) 564 5507






More information about the Lazarus mailing list