Changed: Typo fixes (thanks to Vagrant!)

This commit is contained in:
kervala 2013-02-08 13:26:07 +01:00
parent 98606fb5b5
commit 39668984c1
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); //nlfseek64 (Handle, 0, SEEK_END);
//uint32 nFileSize = ftell (Handle); //uint32 nFileSize = ftell (Handle);
nlfseek64 (Handle, nFileSize-4, SEEK_SET); nlfseek64 (Handle, nFileSize-4, SEEK_SET);
uint32 nOffsetFromBegining; uint32 nOffsetFromBeginning;
if (fread (&nOffsetFromBegining, sizeof(uint32), 1, Handle) != 1) if (fread (&nOffsetFromBeginning, sizeof(uint32), 1, Handle) != 1)
{ {
fclose(Handle); fclose(Handle);
return; return;
} }
#ifdef NL_BIG_ENDIAN #ifdef NL_BIG_ENDIAN
NLMISC_BSWAP32(nOffsetFromBegining); NLMISC_BSWAP32(nOffsetFromBeginning);
#endif #endif
nlfseek64 (Handle, nOffsetFromBegining, SEEK_SET); nlfseek64 (Handle, nOffsetFromBeginning, SEEK_SET);
uint32 nNbFile; uint32 nNbFile;
if (fread (&nNbFile, sizeof(uint32), 1, Handle) != 1) if (fread (&nNbFile, sizeof(uint32), 1, Handle) != 1)
{ {

View file

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

View file

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

View file

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