summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/hci.c10
1 files 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);
}
}