Skip to content

Commit dba9076

Browse files
adienespfitzseb
authored andcommitted
Update src/tokenize.jl
Co-authored-by: Sebastian Pfitzner <[email protected]> (cherry picked from commit 542dcd7, PR JuliaLang#553)
1 parent ea7e2b6 commit dba9076

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)