Este site funciona melhor com JavaScript.
Página inicial
Explorar
Ajuda
Acessar
Immanuel
/
nnn
Observar
1
Favorito
0
Fork
0
Código
Issues
0
Pull requests
0
Versões
0
Wiki
Atividade
Ver código fonte
Fix segfault in readln()
This could be reproduced simply by doing: [TAB] and backspacing a few times.
master
sin
10 anos atrás
pai
330adc995f
commit
cfd530b167
1 arquivos alterados
com
7 adições
e
2 exclusões
Visão dividida
Opções de diferenças
Mostrar estatísticas
Baixar arquivo de patch
Baixar arquivo de diferenças
+7
-2
noice.c
+ 7
- 2
noice.c
Ver arquivo
@@ -287,8 +287,13 @@ readln(void)
if (c == KEY_BACKSPACE) {
getyx(stdscr, y, x);
if (x >= x0) {
ln = realloc(ln, (i - 1) * sizeof(*ln));
i--;
if (i > 0) {
ln = realloc(ln, (i - 1) * sizeof(*ln));
i--;
} else {
free(ln);
ln = NULL;
}
move(y, x);
printw("%c", ' ');
move(y, x);
Escrever
Pré-visualização
Carregando…
Cancelar
Salvar