class: CharacterWriteStream
changed:
#characterSizeChanged:
#nextPut:
(foo+1) > x is the same as foo >= x
--- a/CharacterWriteStream.st Mon Jun 03 20:39:54 2013 +0200
+++ b/CharacterWriteStream.st Mon Jun 03 20:40:36 2013 +0200
@@ -89,7 +89,7 @@
bitsPerCharacter := aCharacterOrString bitsPerCharacter.
currentCharacterSize < bitsPerCharacter ifTrue:[
sz := collection size.
- (position + 1) > sz ifTrue:[
+ position >= sz ifTrue:[
newSz := sz + 1.
] ifFalse:[
newSz := sz.
@@ -213,9 +213,9 @@
currentCharacterSize < aCharacter bitsPerCharacter ifTrue:[
self characterSizeChanged:aCharacter
].
- ((position + 1) > collection size) ifTrue:[self growCollection].
+ (position >= collection size) ifTrue:[self growCollection].
collection at:(position + 1) put:aCharacter.
- ((position + 1) > readLimit) ifTrue:[readLimit := (position + 1)].
+ (position >= readLimit) ifTrue:[readLimit := (position + 1)].
position := position + 1.
] ifFalse:[
WriteError raiseErrorString:'write beyond writeLimit'
@@ -251,10 +251,10 @@
!CharacterWriteStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.11 2013-06-03 17:49:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.12 2013-06-03 18:40:36 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.11 2013-06-03 17:49:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterWriteStream.st,v 1.12 2013-06-03 18:40:36 cg Exp $'
! !