Fix bugs in CefByteReadHandler::Seek().

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@141 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2010-11-17 22:59:46 +00:00
parent 3dd54c536c
commit 811a0ce08b
1 changed files with 4 additions and 3 deletions

View File

@ -31,18 +31,19 @@ int CefByteReadHandler::Seek(long offset, int whence)
if(offset_ + offset > size_)
break;
offset_ += offset;
rv = offset_;
rv = 0;
break;
case SEEK_END:
if(offset > static_cast<long>(size_))
break;
offset_ = size_ - offset;
rv = offset_;
rv = 0;
break;
case SEEK_SET:
if(offset > static_cast<long>(size_))
break;
offset_ = offset;
rv = offset_;
rv = 0;
break;
}
Unlock();