mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
fix endian.h (be64toh) bug
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include "RouterInfo.h"
|
||||
#include "RouterContext.h"
|
||||
|
||||
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace data
|
||||
@@ -41,7 +43,7 @@ namespace data
|
||||
|
||||
void RouterInfo::ReadFromFile (const char * filename)
|
||||
{
|
||||
std::ifstream s(filename, std::ios::binary);
|
||||
std::ifstream s(filename, std::ifstream::binary);
|
||||
if (s.is_open ())
|
||||
{
|
||||
s.seekg (0,std::ios::end);
|
||||
@@ -221,16 +223,6 @@ namespace data
|
||||
{
|
||||
uint8_t len;
|
||||
s.read ((char *)&len, 1);
|
||||
|
||||
//static int count_l = 0;
|
||||
//count_l++;
|
||||
//std::cout << count_l << " " << (int)len << std::endl;
|
||||
//if (len > 40)
|
||||
//{
|
||||
// std::cout << (int)len << std::endl;
|
||||
//}
|
||||
|
||||
|
||||
s.read (str, len);
|
||||
str[len] = 0;
|
||||
return len+1;
|
||||
|
||||
Reference in New Issue
Block a user