diff --git a/src/Bloc/ByteString.extension.st b/src/Bloc/ByteString.extension.st index 17e445d6e..2d643a7ef 100644 --- a/src/Bloc/ByteString.extension.st +++ b/src/Bloc/ByteString.extension.st @@ -2,5 +2,5 @@ Extension { #name : #ByteString } { #category : #'*Bloc' } ByteString >> gtCharIndexAtByteOffset: anOffset [ - ^ anOffset + 1 + ^ (anOffset + 1) min: self size ] diff --git a/src/Bloc/ByteSymbol.extension.st b/src/Bloc/ByteSymbol.extension.st index 5137adcba..69206cdde 100644 --- a/src/Bloc/ByteSymbol.extension.st +++ b/src/Bloc/ByteSymbol.extension.st @@ -2,5 +2,5 @@ Extension { #name : #ByteSymbol } { #category : #'*Bloc' } ByteSymbol >> gtCharIndexAtByteOffset: anOffset [ - ^ anOffset + 1 + ^ (anOffset + 1) min: self size ]