Skip to content

Commit 542dcd7

Browse files
adienespfitzseb
andauthored
Update src/tokenize.jl
Co-authored-by: Sebastian Pfitzner <[email protected]>
1 parent 65a5ca3 commit 542dcd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tokenize.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ end
13391339
function simple_hash(str)
13401340
ind = 1
13411341
h = UInt64(0)
1342-
L = length(str)
1342+
L = min(lastindex(str), MAX_KW_LENGTH)
13431343
while ind <= L
13441344
h = simple_hash(str[ind], h)
13451345
ind = nextind(str, ind)

0 commit comments

Comments
 (0)