X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=src%2Fstdlib%2Fltoa.c;h=13fbc83bc04e7c1d3e63a7eb4cde1f6e79252b51;hb=6f720ff00773571c2fa2d35e67bff68547617639;hp=430cf8b28b66a1aac0736d9f4e5125aa2341b94b;hpb=807b2dd5b7365eb87b482197af3b4a3f520c14f7;p=msp430-libc.git diff --git a/src/stdlib/ltoa.c b/src/stdlib/ltoa.c index 430cf8b..13fbc83 100644 --- a/src/stdlib/ltoa.c +++ b/src/stdlib/ltoa.c @@ -28,7 +28,7 @@ char *ltoa(long num, char *str, int radix) { temp[temp_loc++] = digit + '0'; else temp[temp_loc++] = digit - 10 + 'A'; - ((unsigned long)num) /= radix; + num = ((unsigned long)num) / radix; } while ((unsigned long)num > 0); //now add the sign for radix 10