mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fix binary files
This commit is contained in:
parent
89a1310f11
commit
7d2281b477
3 changed files with 18 additions and 7 deletions
|
@ -60,7 +60,7 @@ namespace i2p
|
|||
|
||||
bool RouterContext::Load ()
|
||||
{
|
||||
std::ifstream fk (ROUTER_KEYS);
|
||||
std::ifstream fk (ROUTER_KEYS, std::ios::binary);
|
||||
if (!fk.is_open ()) return false;
|
||||
|
||||
fk.read ((char *)&m_Keys, sizeof (m_Keys));
|
||||
|
@ -74,10 +74,10 @@ namespace i2p
|
|||
|
||||
void RouterContext::Save ()
|
||||
{
|
||||
std::ofstream fk (ROUTER_KEYS);
|
||||
std::ofstream fk (ROUTER_KEYS, std::ios::binary);
|
||||
fk.write ((char *)&m_Keys, sizeof (m_Keys));
|
||||
|
||||
std::ofstream fi (ROUTER_INFO);
|
||||
std::ofstream fi(ROUTER_INFO, std::ios::binary);
|
||||
fi.write ((char *)m_RouterInfo.GetBuffer (), m_RouterInfo.GetBufferLen ());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue