From: d_m <d_m@plastic-idolatry.com>
---
src/devices/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/devices/file.c b/src/devices/file.c
index 56a1baf..3e124fc 100644
--- a/src/devices/file.c
+++ b/src/devices/file.c
@@ -282,7 +282,9 @@ stat_size(Uint8 *dest, Uint16 len, off_t size)
Uint16 i;
dest += len - 1;
for (i = 0; i < len; i++) {
- *(dest--) = '0' + (Uint8)(size & 0xf);
+ char c = '0' + (Uint8)(size & 0xf);
+ if (c > '9') c += 39;
+ *(dest--) = c;
size = size >> 4;
}
return size == 0 ? len : stat_fill(dest, len, '?');
--
2.39.5