2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Tighten up plStreamSource::GetFile for internal clients

This commit is contained in:
2012-01-09 01:24:20 -05:00
parent 51e89d630e
commit e28993aab5

View File

@ -128,7 +128,12 @@ hsStream* plStreamSource::GetFile(std::wstring filename)
if (plSecureStream::IsSecureFile(sFilename.c_str()))
{
UInt32 encryptionKey[4];
plFileUtils::GetSecureEncryptionKey(sFilename.c_str(), encryptionKey, 4);
if (!plFileUtils::GetSecureEncryptionKey(sFilename.c_str(), encryptionKey, 4))
{
FATAL("Hey camper... You need an NTD key file!");
return nil;
}
fFileData[filename].fStream = plSecureStream::OpenSecureFile(sFilename.c_str(), 0, encryptionKey);
}
else // otherwise it is an encrypted or plain stream, this call handles both