diff options
Diffstat (limited to 'src/plist.c')
| -rw-r--r-- | src/plist.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plist.c b/src/plist.c index eed2d48..4d4fce4 100644 --- a/src/plist.c +++ b/src/plist.c | |||
| @@ -29,7 +29,7 @@ const char *plist_base = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ | |||
| 29 | <plist version=\"1.0\">\n\ | 29 | <plist version=\"1.0\">\n\ |
| 30 | </plist>\0"; | 30 | </plist>\0"; |
| 31 | 31 | ||
| 32 | char* format_string(char* buf, int cols, int depth) | 32 | char* format_string(const char* buf, int cols, int depth) |
| 33 | { | 33 | { |
| 34 | int colw = depth + cols + 1; //new buf cols width | 34 | int colw = depth + cols + 1; //new buf cols width |
| 35 | int len = strlen(buf); | 35 | int len = strlen(buf); |
| @@ -48,7 +48,6 @@ char* format_string(char* buf, int cols, int depth) | |||
| 48 | for (j = 0; j < depth; j++) | 48 | for (j = 0; j < depth; j++) |
| 49 | new_buf[len+(1+depth)*nlines + 1 + j] = '\t'; | 49 | new_buf[len+(1+depth)*nlines + 1 + j] = '\t'; |
| 50 | new_buf[len+(1+depth)*nlines+depth+1] = '\0'; | 50 | new_buf[len+(1+depth)*nlines+depth+1] = '\0'; |
| 51 | free(buf); | ||
| 52 | return new_buf; | 51 | return new_buf; |
| 53 | } | 52 | } |
| 54 | 53 | ||
