From: Cyrill G. <gor...@op...> - 2013-05-07 20:15:57
|
On Tue, May 07, 2013 at 01:08:30PM -0700, anonymous coward wrote: > > - char numbuf[20]; > > + char numbuf[32]; > > snprintf(numbuf, sizeof(numbuf), "%"PRId64"", val); > > This should be 21, not 32. > > # echo "l(2^63)/l(10)" | bc -l > 18.96488972683081529852 > > So 1+19+1=21, to hold '-', the digits, and the '\0'. 32 here is to be 8 byte aligned for easier review on object disasm level if needed. Is there some problem I missed? |