From 56fecf8323ef66639973fc0afbe08410ead513f6 Mon Sep 17 00:00:00 2001 From: Aous Naman Date: Mon, 31 Jul 2023 15:52:55 +1000 Subject: [PATCH] Bug fix for issue #106. --- src/core/codestream/ojph_codestream_local.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/codestream/ojph_codestream_local.cpp b/src/core/codestream/ojph_codestream_local.cpp index e899740..8518ba7 100644 --- a/src/core/codestream/ojph_codestream_local.cpp +++ b/src/core/codestream/ojph_codestream_local.cpp @@ -664,7 +664,7 @@ namespace ojph { t = swap_byte(comments[i].Rcom); if (file->write(&t, 2) != 2) OJPH_ERROR(0x0003002A, "Error writing to file"); - if (file->write(comments[i].data, len) != len) + if (file->write(comments[i].data, comments[i].len) != comments[i].len) OJPH_ERROR(0x0003002B, "Error writing to file"); } }