[BUG][FIX] two methods in MultiCharacter search a class in the
metaclass hierarchy
Boris Gaertner
Boris.Gaertner at gmx.net
Fri Nov 26 14:38:05 UTC 2004
This bug report is for Squeak 3.8 gamma latest update: #6485
First of all my apologies for the difficult subject title. The matter
itself is quite simple.
In MultiCharacter>>asUnicode we read:
asUnicode
| table charset v |
charset _ EncodedCharSet charsetAt: self leadingChar.
" ==> " (charset isKindOf: Unicode class) ifTrue: [^ self charCode].
table _ charset ucsTable.
table isNil ifTrue: [^ 16rFFFD].
v _ table at: self charCode + 1.
v = -1 ifTrue: [^ 16rFFFD].
^ v.
EncodedCharSet>>charSetAt: answers a class. Unicode is also
a class, to find out whether charset is located in the class tree that
starts with Unicode, we have to write:
(charset isKindOf: Unicdoe)
The added 'class' is badly wrong; it takes us into the metaclass
hierarchy where the check answers false.
Same for MultiCharacter>>asUnicodeChar.
Greetings,
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultiCharacterFix.1.cs
Type: application/octet-stream
Size: 1095 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041126/fb0ee7ef/MultiCharacterFix.1.obj
More information about the Squeak-dev
mailing list
|