diff options
author | FreeArtMan <dos21h@gmail.com> | 2019-05-14 17:19:47 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2019-05-14 17:19:47 +0100 |
commit | 2e06ffc51227fb9d613f6e068ffe04e0c4a23cb9 (patch) | |
tree | 8935e82ce4c85740b07499fb96194c6d636f3ae5 /buf_misc.c | |
parent | e02f131fdec629a043471962d7137ed929b2a6a1 (diff) | |
download | libbuf-2e06ffc51227fb9d613f6e068ffe04e0c4a23cb9.tar.gz libbuf-2e06ffc51227fb9d613f6e068ffe04e0c4a23cb9.zip |
BufLine when return line, dont return seperate character, shift out seperator character
Diffstat (limited to 'buf_misc.c')
-rw-r--r-- | buf_misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |