find and fix a bug: change seekPos's data type from int to long long,

by considering the situation when VSTree file's size exceed 2G bytes.

author: hanshuo
This commit is contained in:
Caesar11 2015-09-09 08:06:38 +00:00
parent aca113dabd
commit e928c60a93
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ bool LRUCache::writeOut(int _pos, int _fileLine)
int line = _fileLine == -1 ? nodePtr->getFileLine() : _fileLine;
size_t vNodeSize = sizeof(VNode);
int flag = 0;
int seekPos = (long long)line * vNodeSize;
long long seekPos = (long long)line * vNodeSize;
flag = fseek(filePtr, seekPos, SEEK_SET);