Open 1-p opened 8 years ago
@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)
to reproduce, start a new line, hit
TAB
, then/
twice.or hit
/
twice and thenTAB
at the beginning of the line.Segmentation fault: 11
Seems like the
while(*p)
loop ineditorUpdateSyntax
has some bug.https://github.com/antirez/kilo/blob/master/kilo.c#L401