Swap the archive type on big endian architectures

This commit is contained in:
smallmodel 2024-10-15 23:33:26 +02:00
parent e00ebda641
commit 7d1067108b
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -1123,7 +1123,8 @@ int Archiver::ReadType(void)
void Archiver::WriteType(int type)
{
archivefile.Write(&type, sizeof(type));
int nt = LittleLong(type);
archivefile.Write(&nt, sizeof(nt));
}
void Archiver::CheckType(int type)
@ -1146,8 +1147,7 @@ void Archiver::CheckType(int type)
}
}
} else {
int nt = LittleLong(type);
archivefile.Write(&nt, sizeof(nt));
WriteType(type);
}
}