From 2e06ffc51227fb9d613f6e068ffe04e0c4a23cb9 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Tue, 14 May 2019 17:19:47 +0100 Subject: BufLine when return line, dont return seperate character, shift out seperator character --- buf_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buf_misc.c b/buf_misc.c index 5fbcd63..d3c540e 100644 --- a/buf_misc.c +++ b/buf_misc.c @@ -94,7 +94,8 @@ int BufLine::pop_line(char **val, int *size) int idx; if (1 == buf->findc('\n',&idx)) { - buf->popsubstring(idx+1,val,size); + buf->popsubstring(idx,val,size); + buf->shiftleft(1);//remove seperator character return 0; } return -1; -- cgit v1.2.3