Skip to content

Commit 8927953

Browse files
committed
handle 64bit print better
1 parent 15963ed commit 8927953

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/ValidateMP4.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -658,30 +658,14 @@ char *int64toxstr_r(UInt64 num, char * str)
658658
char *int64todstr(UInt64 num)
659659
{
660660
static char str[40];
661-
UInt32 hi,lo;
662-
663-
hi = num>>32;
664-
lo = num&(0xffffffff);
665-
666-
if (hi)
667-
sprintf(str,"%ld%8.8ld",(unsigned long) hi,(unsigned long) lo);
668-
else
669-
sprintf(str,"%ld",(unsigned long) lo);
661+
sprintf(str,"%lld",(long long) num);
670662
return str;
671663
}
672664

673665

674666
char *int64todstr_r(UInt64 num, char * str)
675667
{
676-
UInt32 hi,lo;
677-
678-
hi = num>>32;
679-
lo = num&(0xffffffff);
680-
681-
if (hi)
682-
sprintf(str,"%ld%8.8ld",(unsigned long) hi,(unsigned long) lo);
683-
else
684-
sprintf(str,"%ld",(unsigned long) lo);
668+
sprintf(str,"%lld",(long long) num);
685669
return str;
686670
}
687671

0 commit comments

Comments
 (0)