Chris Muller uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-cmm.137.mcz==================== Summary ====================
Name: Graphics-cmm.137
Author: cmm
Time: 12 June 2010, 6:55:00.502 pm
UUID: 3d9ce3b8-958a-4f45-91b6-97f40d54e952
Ancestors: Graphics-cmm.136
Added guard from #basicScanCharactersFrom: to: in: rightX: stopConditions: kern: overrunning the sourceString. Useful for when scanning text's with embedded morphs.
=============== Diff against Graphics-cmm.136 ===============
Item was changed:
----- Method: CharacterScanner>>scanCharactersFrom:to:in:rightX:stopConditions:kern: (in category 'scanning') -----
scanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta
| startEncoding selector |
+ (sourceString isByteString) ifTrue: [^ self basicScanCharactersFrom: startIndex to: (stopIndex min: sourceString size) in: sourceString rightX: rightX stopConditions: stops kern: kernDelta.].
- (sourceString isByteString) ifTrue: [^ self basicScanCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX stopConditions: stops kern: kernDelta.].
(sourceString isWideString) ifTrue: [
startIndex > stopIndex ifTrue: [lastIndex := stopIndex. ^ stops endOfRun].
startEncoding := (sourceString at: startIndex) leadingChar.
selector := EncodedCharSet scanSelectorAt: startEncoding.
^ self perform: selector withArguments: (Array with: startIndex with: stopIndex with: sourceString with: rightX with: stops with: kernDelta).
].
^ stops endOfRun
!