From 230f57309dce0d01fd35bdc9dac460f348ec0dab Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 10 Jan 2007 10:23:51 +0000 Subject: Small fix in case hs->data_start != 0 --- audio/headset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/headset.c') diff --git a/audio/headset.c b/audio/headset.c index b1b1143f..02938768 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -310,7 +310,7 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, gpointer user_ /* Make sure the data is null terminated so we can use string * functions */ - hs->buf[hs->data_length] = '\0'; + hs->buf[hs->data_start + hs->data_length] = '\0'; cr = strchr(&hs->buf[hs->data_start], '\r'); if (cr) { -- cgit