Changed: Typo fixes (thanks to Vagrant!)

This commit is contained in:
kervala 2013-02-08 13:26:07 +01:00
parent 45c8b20f39
commit c71e6e82f1
4 changed files with 16 additions and 16 deletions

View file

@ -1222,18 +1222,18 @@ void CFileContainer::addSearchBigFile (const string &sBigFilename, bool recurse,
//nlfseek64 (Handle, 0, SEEK_END);
//uint32 nFileSize = ftell (Handle);
nlfseek64 (Handle, nFileSize-4, SEEK_SET);
uint32 nOffsetFromBegining;
if (fread (&nOffsetFromBegining, sizeof(uint32), 1, Handle) != 1)
uint32 nOffsetFromBeginning;
if (fread (&nOffsetFromBeginning, sizeof(uint32), 1, Handle) != 1)
{
fclose(Handle);
return;
}
#ifdef NL_BIG_ENDIAN
NLMISC_BSWAP32(nOffsetFromBegining);
NLMISC_BSWAP32(nOffsetFromBeginning);
#endif
nlfseek64 (Handle, nOffsetFromBegining, SEEK_SET);
nlfseek64 (Handle, nOffsetFromBeginning, SEEK_SET);
uint32 nNbFile;
if (fread (&nNbFile, sizeof(uint32), 1, Handle) != 1)
{

View file

@ -148,18 +148,18 @@ struct BNPHeader
uint32 nFileSize=CFile::getFileSize (filename);
nlfseek64 (f, nFileSize-sizeof(uint32), SEEK_SET);
uint32 nOffsetFromBegining;
if (fread (&nOffsetFromBegining, sizeof(uint32), 1, f) != 1)
uint32 nOffsetFromBeginning;
if (fread (&nOffsetFromBeginning, sizeof(uint32), 1, f) != 1)
{
fclose (f);
return false;
}
#ifdef NL_BIG_ENDIAN
NLMISC_BSWAP32(nOffsetFromBegining);
NLMISC_BSWAP32(nOffsetFromBeginning);
#endif
if (nlfseek64 (f, nOffsetFromBegining, SEEK_SET) != 0)
if (nlfseek64 (f, nOffsetFromBeginning, SEEK_SET) != 0)
{
fclose (f);
return false;

View file

@ -1701,18 +1701,18 @@ bool CPatchManager::readBNPHeader(const string &SourceName, vector<SBNPFile> &Fi
uint32 nFileSize = NLMISC::CFile::getFileSize (SourceName);
nlfseek64 (f, nFileSize-sizeof(uint32), SEEK_SET);
uint32 nOffsetFromBegining;
if (fread (&nOffsetFromBegining, sizeof(uint32), 1, f) != 1)
uint32 nOffsetFromBeginning;
if (fread (&nOffsetFromBeginning, sizeof(uint32), 1, f) != 1)
{
fclose(f);
return false;
}
#ifdef NL_BIG_ENDIAN
NLMISC_BSWAP32(nOffsetFromBegining);
NLMISC_BSWAP32(nOffsetFromBeginning);
#endif
if (nlfseek64 (f, nOffsetFromBegining, SEEK_SET) != 0)
if (nlfseek64 (f, nOffsetFromBeginning, SEEK_SET) != 0)
{
fclose(f);
return false;

View file

@ -150,18 +150,18 @@ static void markBNPFile(std::string &path)
return;
}
uint32 nOffsetFromBegining;
if (fread (&nOffsetFromBegining, sizeof(uint32), 1, f) != 1)
uint32 nOffsetFromBeginning;
if (fread (&nOffsetFromBeginning, sizeof(uint32), 1, f) != 1)
{
fclose (f);
return;
}
#ifdef NL_BIG_ENDIAN
NLMISC_BSWAP32(nOffsetFromBegining);
NLMISC_BSWAP32(nOffsetFromBeginning);
#endif
if (nlfseek64 (f, nOffsetFromBegining, SEEK_SET) != 0)
if (nlfseek64 (f, nOffsetFromBeginning, SEEK_SET) != 0)
{
fclose (f);
return;