From 75cd745baf8c35183dd9d4a34864e1acf72f5ca5 Mon Sep 17 00:00:00 2001 From: mccallum Date: Fri, 22 Mar 1996 02:36:22 +0000 Subject: [PATCH] ([BinaryCStream -encodeValueOfCType:at:withName:name]): [_C_CHARPTR]: Write the string with the host LENGTH, not the network LENGTH! git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1256 72102866-910b-0410-8b05-ffd578937521 --- Source/BinaryCStream.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/BinaryCStream.m b/Source/BinaryCStream.m index f907ae4e6..6371a389d 100644 --- a/Source/BinaryCStream.m +++ b/Source/BinaryCStream.m @@ -153,8 +153,9 @@ static BOOL debug_binary_coder; case _C_CHARPTR: { unsigned length = strlen (*(char**)d); - length = htonl (length); - [stream writeBytes: &length + unsigned nlength; + nlength = htonl (length); + [stream writeBytes: &nlength length: NUM_BYTES_STRING_LENGTH]; [stream writeBytes: *(char**)d length: length];