[haiku-development] Re: Get/calculate size

  • From: Gabriele Biffi <mlist@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 29 Nov 2012 23:34:07 +0100

Il 29/11/12 19:56, looncraz ha scritto:
If this is the functioning code, change atol(buf) to atoll(buf) and give
it a go.

The problem with atol and friends is that they're unsafe.


atol()'s return value * 2048 should be large enough already!

Nope, long*int results in a long that isn't long enough :)

You can also cast one of the operands to uint64 of course.


Regards

Gabriele



Other related posts: