fix overeager padding being added to string array

This commit is contained in:
iceman1001 committed 2026-08-27 13:42:14 +02:00
1 parent 2b00e3f513
commit 8b9f3951b1
1 file changed
+4 -1
+4 -1
View File
@@ -272,7 +272,10 @@ void hex_to_buffer(uint8_t *buf, const uint8_t *hex_data, const size_t hex_len,
m = hex_max_len;
}
while (m--) {
// Pad up to m, the way ascii_to_buffer() above does. This used to write m
// spaces from wherever it had got to, so a padded field came out i
// characters too wide - a 7 byte AID asked to fill 16 produced 30.
for (; i < m; i++) {
*(tmp++) = ' ';
}