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:
parent
3dd54c536c
commit
811a0ce08b
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue