[2555] in BarnOwl Developers
[PATCH 3/4] _owl_fmtext_append_fmtext takes an inclusive range
daemon@ATHENA.MIT.EDU (David Benjamin)
Sun Jul 25 17:59:15 2010
From: David Benjamin <davidben@MIT.EDU>
To: barnowl-dev@mit.edu
Date: Sun, 25 Jul 2010 14:56:59 -0700
In-Reply-To: <1280095020-26263-1-git-send-email-davidben@mit.edu>
owl_fmtext_append_fmtext incorrectly appends an extra '\0', causing
textlen to be off. This fixes the first failure in the owl_fmtext test.
---
fmtext.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fmtext.c b/fmtext.c
index f811e9d..d9d2993 100644
--- a/fmtext.c
+++ b/fmtext.c
@@ -220,7 +220,7 @@ static void _owl_fmtext_append_fmtext(owl_fmtext *f, const owl_fmtext *in, int s
/* append fmtext 'in' to 'f' */
void owl_fmtext_append_fmtext(owl_fmtext *f, const owl_fmtext *in)
{
- _owl_fmtext_append_fmtext(f, in, 0, in->textlen);
+ _owl_fmtext_append_fmtext(f, in, 0, in->textlen - 1);
}
--
1.7.2.rc2.1.gaace1