nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit d85098abda3f996e491776202a044635f1d4b380
parent 13f8ddcaf211e6a493ff37d52898ac3c598d8ba2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 19 Jan 2018 20:27:53 +0100

tweaks: reshuffle a couple of lines, to make a bit more sense

Diffstat:
Msrc/rcfile.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -848,17 +848,17 @@ void pick_up_name(const char *kind, char *ptr, char **storage) /* If the argument starts with a quote, find the terminating quote. */ if (*ptr == '"') { - char *look = ++ptr; - - look += strlen(ptr); + char *look = ptr + strlen(ptr); while (*look != '"') { - if (--look < ptr) { + if (--look == ptr) { rcfile_error(N_("Argument of '%s' lacks closing \""), kind); return; } } + *look = '\0'; + ptr++; } *storage = mallocstrcpy(*storage, ptr);