On 7 February 2013 14:15, S Krish <
[hidden email]> wrote:
>
>
> Find that the NBExternalAddress >> readString returns extra bytes...
>
> did a simple cmd pipe interface .. and the readPipe with a buffer passed
> ends up with 4 bytes extra in specific boundary of passed buffer size.
>
> viz: if I pass buf := ( NativeBoost allocate: 4096) as the buffer and then
> read it as buf readString. The size returned is 4100 instead of 4096. For
> some other lesser reads occassionally it is off by one byte..
>
well, readString copying a null-terminated string from memory to
ByteString instance
and to calculate the string size it searching for first zero byte in
provided buffer..
if you buffer contains no zeroes at all, it will keep looking until it
find it (since it has no idea
of your buffer size).
>
> Will try to post a simple example to replicate this.
--
Best regards,
Igor Stasenko.