summaryrefslogtreecommitdiff
path: root/lib/st
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2009-04-07 23:38:39 +0000
committerDavid Reiss <dreiss@apache.org>2009-04-07 23:38:39 +0000
commitc6adf050dfd5fd4b656300cdb49af791a6a19d88 (patch)
tree022aa871977008ef32a7207378a5f5f35b1afd53 /lib/st
parent0781f2b549903cad62846aa5ac1ae4a25ab49508 (diff)
downloadthrift-c6adf050dfd5fd4b656300cdb49af791a6a19d88.tar.gz
smalltalk: Fix TBinaryProtocol readString for empty strings
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'lib/st')
-rw-r--r--lib/st/thrift.st7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/st/thrift.st b/lib/st/thrift.st
index 251202fef..6883539ff 100644
--- a/lib/st/thrift.st
+++ b/lib/st/thrift.st
@@ -288,9 +288,12 @@ readSetBegin
elemType: self readByte;
size: self readI32! !
-!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/26/2007 04:48'!
+!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 02/07/2009 19:00'!
readString
- ^ (transport read: self readI32) asString! !
+readString
+ | sz |
+ sz := self readI32.
+ ^ sz > 0 ifTrue: [(transport read: sz) asString] ifFalse: ['']! !
!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:22'!
unsignedInt: val size: size