Mercurial > hg > forks > yadex
changeset 38:e5cd0f139fc1
Adding to readline history should be done before any string manipulations.
Fixed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 24 Sep 2011 18:10:56 +0300 |
parents | 5f366c1ed459 |
children | 0afa189be30d |
files | src/yadex.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/yadex.cc Sat Sep 24 17:54:36 2011 +0300 +++ b/src/yadex.cc Sat Sep 24 18:10:56 2011 +0300 @@ -588,6 +588,7 @@ /* get the input */ #ifdef Y_READLINE input = readline("yadex: "); + add_history(input); #else printf("yadex: "); if (!fgets(input, sizeof input, stdin)) @@ -1155,7 +1156,6 @@ printf("Unknown command \"%s\"!\n", com); #ifdef Y_READLINE - add_history(input); free(input); #endif }