aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-09-17 23:40:06 +0200
committerjcid <devnull@localhost>2008-09-17 23:40:06 +0200
commitd61666920e33d15d25ac6381e4f4c64f66165493 (patch)
tree830606c48ba658723aae8eb41be16a62a1b551ce /src/misc.c
parent29a9d7ce54badbb0f5e5b2b747b78a88bc5715c2 (diff)
- Fixed a memory leak in plain.cc.
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc.c b/src/misc.c
index 7cb0b9ff..681fbdb9 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -52,13 +52,13 @@ char *a_Misc_escape_chars(const char *str, const char *esc_set)
/*
* Takes a string and converts any tabs to spaces.
*/
-char *a_Misc_expand_tabs(const char *str)
+char *a_Misc_expand_tabs(const char *str, int len)
{
Dstr *New = dStr_new("");
- int len, i, j, pos, old_pos;
+ int i, j, pos, old_pos;
char *val;
- if ((len = strlen(str))) {
+ if (len) {
for (pos = 0, i = 0; i < len; i++) {
if (str[i] == '\t') {
/* Fill with whitespaces until the next tab. */