From: <rem...@us...> - 2008-10-09 20:34:25
|
Revision: 11956 http://jvcl.svn.sourceforge.net/jvcl/?rev=11956&view=rev Author: remkobonte Date: 2008-10-09 20:34:23 +0000 (Thu, 09 Oct 2008) Log Message: ----------- Buffer sizes are in bytes not in chars. Modified Paths: -------------- trunk/jvcl/run/JvCreateProcess.pas Modified: trunk/jvcl/run/JvCreateProcess.pas =================================================================== --- trunk/jvcl/run/JvCreateProcess.pas 2008-10-09 16:11:29 UTC (rev 11955) +++ trunk/jvcl/run/JvCreateProcess.pas 2008-10-09 20:34:23 UTC (rev 11956) @@ -766,7 +766,7 @@ FInputBuffer := nil; FInputBufferSize := CCPS_BufferSize; FInputBufferEnd := 0; - ReallocMem(FInputBuffer, FInputBufferSize * SizeOf(Char)); + ReallocMem(FInputBuffer, FInputBufferSize * SizeOf(Byte)); GetMem(FPreBuffer, CCPS_BufferSize); end; @@ -858,13 +858,13 @@ ABufferSize := Min(FInputBufferEnd, CCPS_BufferSize); // Copy the data from FInputBuffer to ABuffer. - Move(FInputBuffer[0], ABuffer[0], ABufferSize * SizeOf(Char)); + Move(FInputBuffer[0], ABuffer[0], ABufferSize * SizeOf(Byte)); // If not all data in FInputBuffer is copied to ABuffer, then place // the data not copied at the begin of FInputBuffer. if FInputBufferEnd > ABufferSize then Move(FInputBuffer[ABufferSize], FInputBuffer[0], - (FInputBufferEnd - ABufferSize) * SizeOf(Char)); + (FInputBufferEnd - ABufferSize) * SizeOf(Byte)); Dec(FInputBufferEnd, ABufferSize); finally This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |