Fabio Alessandrelli cbc772d696 Fix buffers size calculation in PacketPeerStream.
The calculation used to be wrong when exactly at a power of 2.
`nearest_shift` always return the "next" power of 2
`nearest_shift(4) == 3 # 2^3 = 8`.

On the other hand `next_power_of_2` returns the exact value if that
value is a power of 2 (i.e. `next_power_of_2(4) == 4`).

I.e. :
```
WARN_PRINT(itos(next_power_of_2(4)) + " " + itos(1 << nearest_shift(4)));
// WARNING: ... : 4 8
```

Is this by design?
2019-12-22 15:35:44 +01:00
..
2019-09-24 21:33:09 +02:00
2019-09-14 13:08:28 -07:00
2019-08-08 11:58:57 +03:00
2019-08-08 11:58:57 +03:00
2019-09-25 10:28:50 +02:00
2019-05-09 06:25:32 -04:00
2019-01-30 06:43:56 +01:00
2019-05-30 10:28:03 +02:00
2019-09-04 12:17:07 +08:00
2019-09-04 12:17:07 +08:00
2019-01-01 12:58:10 +01:00
2019-08-12 04:26:38 -05:00
2019-11-03 10:37:48 -06:00
2019-08-12 04:26:38 -05:00
2019-08-12 04:26:38 -05:00