Skip to content

Commit

Permalink
This fixed a warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Jun 5, 2023
1 parent bfa556c commit 5832bf7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/core/codestream/ojph_codestream_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,21 +654,17 @@ namespace ojph {

for (ui32 i = 0; i < num_comments; ++i)
{
char* data = comments[i].data;
ui32 Rcom = comments[i].Rcom;
ui32 len = comments[i].len;

t = swap_byte(JP2K_MARKER::COM);
if (file->write(&t, 2) != 2)
OJPH_ERROR(0x00030028, "Error writing to file");
t = swap_byte((ui16)(len + 4));
t = swap_byte((ui16)(comments[i].len + 4));
if (file->write(&t, 2) != 2)
OJPH_ERROR(0x00030029, "Error writing to file");
//1 for General use (IS 8859-15:1999 (Latin) values)
t = swap_byte(Rcom);
t = swap_byte(comments[i].Rcom);
if (file->write(&t, 2) != 2)
OJPH_ERROR(0x0003002A, "Error writing to file");
if (file->write(data, len) != len)
if (file->write(comments[i].data, len) != len)
OJPH_ERROR(0x0003002B, "Error writing to file");
}
}
Expand Down

0 comments on commit 5832bf7

Please sign in to comment.