kilo
kilo copied to clipboard
"\t//" crashes kilo (sometimes!)
to reproduce, start a new line, hit TAB
, then /
twice.
or hit /
twice and then TAB
at the beginning of the line.
Segmentation fault: 11
Seems like the while(*p)
loop in editorUpdateSyntax
has some bug.
https://github.com/antirez/kilo/blob/master/kilo.c#L401
@1-p Thanks for reporting! :-) Are you able to reproduce this? What platform are you using?
I'm unable to reproduce. I've tested under both Linux and OS X.
I was able to reproduce it (Linux, Elementary OS). The PR solves it though.
It is reproducing for me too. OS X. Always.
@practicalswift Well, do it in a new line and enter \t//
It's due to a negative memset argument, as I said. And the PR I submitted fixed it. (changed a single char)