fix line crlf stripping but util.c
Signed-off-by: AGentooCat <agentoocat@mail.i2p>
This commit is contained in:
@ -30,7 +30,7 @@ void strip_crlf(const char *text) {
|
||||
char *cur = strchr(text, 0);
|
||||
// sanely assuming that text has a NUL char
|
||||
cur -= 1;
|
||||
while (*cur == '\r' || *cur == '\n') {
|
||||
while (cur >= text && (*cur == '\r' || *cur == '\n')) {
|
||||
*cur = 0;
|
||||
cur -= 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user