Skip to content
Snippets Groups Projects
Commit 8a1993a9 authored by Andreas Gattringer's avatar Andreas Gattringer
Browse files

fix bug in left_trim: didn't work on strings with only one non-space character

parent d825c887
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ char *left_trim(char *line)
if (!isspace(line[start_idx])) break;
}
if (start_idx == len - 1) return line;
if (start_idx == len) return line;
memmove(line, &line[start_idx], len - start_idx);
line[len - start_idx] = '\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment