#include "../fio.h"
+#define ARRAY_LENGTH(arr) sizeof(arr) / sizeof((arr)[0])
+
/*
* Cheesy number->string conversion, complete with carry rounding error.
*/
if (modulo == -1U) {
done:
+ if (post_index >= ARRAY_LENGTH(postfix))
+ post_index = 0;
+
sprintf(buf, "%lu%s%s", num, postfix[post_index],
byte_postfix[byte_post_index]);
return buf;