diff options
| author | Syndamia <kamen@syndamia.com> | 2026-05-27 17:33:23 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2026-07-12 09:14:06 +0300 |
| commit | e68fef2645c69f4e89dd6175f94d71875c42ef7c (patch) | |
| tree | cb48910cddde16506bc82ab2cc5e33cca46e9eb8 /BigInt.c | |
| parent | 2d5a3d315f1dd5af2606823f89e8e787fac5c32b (diff) | |
| download | foollib-e68fef2645c69f4e89dd6175f94d71875c42ef7c.tar foollib-e68fef2645c69f4e89dd6175f94d71875c42ef7c.tar.gz foollib-e68fef2645c69f4e89dd6175f94d71875c42ef7c.zip | |
fix: Simple string convertion for all single-digit values
Diffstat (limited to 'BigInt.c')
| -rw-r--r-- | BigInt.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -372,12 +372,12 @@ B_tostr(MemoryManager *mm, BigInt intx) { usize n = B_bitwidth(intx); - if (0 == n) { + if (10 > n) { char *str = NULL; if (R_Ok != mm->alloc(*mm, (void**)&str, sizeof(char) * 2)) return NULL; - str[0] = '0'; + str[0] = '0' + n; str[1] = '\0'; return str; } |
