From e6564963d4e3c7efe92e30c00fa289dd5a964f28 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Mon, 15 Apr 2002 16:55:14 +0000 Subject: lmp_featuretostr fixes --- src/hci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hci.c b/src/hci.c index 9418eb42..6af14864 100644 --- a/src/hci.c +++ b/src/hci.c @@ -339,13 +339,13 @@ char *lmp_featurestostr(uint8_t *features, char *pref, int width) m = lmp_features_map[i]; while (m->str) { - if ((unsigned int) m->val & (unsigned int) features[i]) + if ((unsigned int) m->val & (unsigned int) features[i]) { ptr += sprintf(ptr, "%s ", m->str); + w = (w + 1) & width; + if (!w) + ptr += sprintf(ptr, "\n%s", pref ? pref : ""); + } m++; - - w = (w + 1) & width; - if (!w) - ptr += sprintf(ptr, "\n%s", pref); } } -- cgit