* Fixed a big bug in common_file_io_vec_pages(): vecOffset was not correctly
set when the first chunk of the file could be read in directly, causing it to read data to a wrong place in the buffer. * Reading in the first chunk directly would have also only worked if vecIndex and vecOffset was 0 when calling the function. * Applied the fs_shell changes in file_map to the kernel version as well (the constructor already worked correctly, though). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23265 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Vendored
+1
-1
@@ -253,7 +253,7 @@ file_map_translate(void *_map, off_t offset, size_t size, file_io_vec *vecs,
|
||||
size_t maxVecs = *_count;
|
||||
status_t status = B_OK;
|
||||
|
||||
if (offset > map.size) {
|
||||
if (offset >= map.size) {
|
||||
*_count = 0;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user