diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -40,6 +40,8 @@ trim(char * str) int begin = 0; int end = strlen(str) - 1; + if (end == -1) return; + while (isspace((unsigned char) str[begin])) begin++; |