rebel-readline icon indicating copy to clipboard operation
rebel-readline copied to clipboard

0x0D (newline) literals in .rebel_readline_history breaks repl

Open djtango opened this issue 5 years ago • 0 comments

If I accidentally enter 0x0D newline characters into my session and they are saved into the repl history, on subsequent startup an exception is thrown:

[Rebel readline] Type :repl/help for online help info
Execution error (StringIndexOutOfBoundsException) at java.lang.String/substring (String.java:1967).
String index out of range: -1

Additional evaluation of forms also throws an exception:

user=> (println "foo")
Execution error (IndexOutOfBoundsException) at java.util.SubList/<init> (AbstractList.java:620).
fromIndex = -11

Steps to replicate:

  • Insert 0x0D literal into repl history: image

  • Start repl

djtango avatar Oct 01 '19 11:10 djtango