[haiku-development] Re: Get/calculate size

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Fri, 23 Nov 2012 21:02:18 +0100

2012/11/23 Gabriele Biffi <mlist@xxxxxxxxx>:
> Il 23/11/12 13:16, Giovanni Mugnai ha scritto:
>
>> I have tried to modify the value  tempas = atol(buf) * 2048;
>> But if i modify this value, all calculations become wrongs.
>
>
> That's because atol() returns a long, and longs are 32 bits... long.
> Use atoll() instead.

Or better strtoll() :
http://pubs.opengroup.org/onlinepubs/009695399/functions/strtol.html

Bye,
Jérôme

Other related posts: