Skip to content

Commit

Permalink
limit String>>#gtCharIndexAtByteOffset: to string length
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Nov 28, 2024
1 parent 326ef62 commit 4bbe349
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Bloc/ByteString.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Extension { #name : #ByteString }

{ #category : #'*Bloc' }
ByteString >> gtCharIndexAtByteOffset: anOffset [
^ anOffset + 1
^ (anOffset + 1) min: self size
]
2 changes: 1 addition & 1 deletion src/Bloc/ByteSymbol.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Extension { #name : #ByteSymbol }

{ #category : #'*Bloc' }
ByteSymbol >> gtCharIndexAtByteOffset: anOffset [
^ anOffset + 1
^ (anOffset + 1) min: self size
]

0 comments on commit 4bbe349

Please sign in to comment.