diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scalaires.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/scalaires.c b/lib/scalaires.c index 7240543..be98e0f 100644 --- a/lib/scalaires.c +++ b/lib/scalaires.c @@ -195,21 +195,21 @@ char *rat_to_string(rationnel rat, int first) switch (display) { case DEC: if (rat.denom == 1) - sprintf(temp, "%qd", rat.num); + sprintf(temp, "%lld", rat.num); else - sprintf(temp, "%qd/%qd", rat.num, rat.denom); + sprintf(temp, "%lld/%lld", rat.num, rat.denom); break; case HEX: if (rat.denom == 1) - sprintf(temp, "0x%qx", rat.num); + sprintf(temp, "0x%llx", rat.num); else - sprintf(temp, "0x%qx/0x%qx", rat.num, rat.denom); + sprintf(temp, "0x%llx/0x%llx", rat.num, rat.denom); break; case OCT: if (rat.denom == 1) - sprintf(temp, "0%qo", rat.num); + sprintf(temp, "0%llo", rat.num); else - sprintf(temp, "0%qo/0%qo", rat.num, rat.denom); + sprintf(temp, "0%llo/0%llo", rat.num, rat.denom); break; case FLT: sprintf(temp, "%g", rat_to_double(rat)); |