Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
75e9c798
Commit
75e9c798
authored
Nov 23, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/iso9660: simplify _read()
parent
99527051
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
Iso9660ArchivePlugin.cxx
src/archive/Iso9660ArchivePlugin.cxx
+15
-14
No files found.
src/archive/Iso9660ArchivePlugin.cxx
View file @
75e9c798
...
@@ -201,25 +201,26 @@ iso9660_input_read(InputStream *is, void *ptr, size_t size,
...
@@ -201,25 +201,26 @@ iso9660_input_read(InputStream *is, void *ptr, size_t size,
}
else
{
}
else
{
no_blocks
=
size
/
ISO_BLOCKSIZE
;
no_blocks
=
size
/
ISO_BLOCKSIZE
;
}
}
if
(
no_blocks
>
0
)
{
cur_block
=
is
->
offset
/
ISO_BLOCKSIZE
;
if
(
no_blocks
==
0
)
return
0
;
readed
=
iso9660_iso_seek_read
(
iis
->
archive
->
iso
,
ptr
,
cur_block
=
is
->
offset
/
ISO_BLOCKSIZE
;
iis
->
statbuf
->
lsn
+
cur_block
,
no_blocks
);
if
(
readed
!=
no_blocks
*
ISO_BLOCKSIZE
)
{
readed
=
iso9660_iso_seek_read
(
iis
->
archive
->
iso
,
ptr
,
error
.
Format
(
iso9660_domain
,
iis
->
statbuf
->
lsn
+
cur_block
,
no_blocks
);
"error reading ISO file at lsn %lu"
,
(
unsigned
long
)
cur_block
);
return
0
;
}
if
(
left_bytes
<
size
)
{
readed
=
left_bytes
;
}
is
->
offset
+=
readed
;
if
(
readed
!=
no_blocks
*
ISO_BLOCKSIZE
)
{
error
.
Format
(
iso9660_domain
,
"error reading ISO file at lsn %lu"
,
(
unsigned
long
)
cur_block
);
return
0
;
}
}
if
(
left_bytes
<
size
)
{
readed
=
left_bytes
;
}
is
->
offset
+=
readed
;
return
readed
;
return
readed
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment