From a1fe5809a4760ed2aa64951c596156f48fca393e Mon Sep 17 00:00:00 2001 From: Giuseppe Baruffa Date: Thu, 29 Mar 2007 08:27:03 +0000 Subject: Some coding style adaptations for compiling the OPJViewer GUI under Linux. It compiles, but does not yet display images. --- OPJViewer/source/wxj2kparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OPJViewer/source/wxj2kparser.cpp') diff --git a/OPJViewer/source/wxj2kparser.cpp b/OPJViewer/source/wxj2kparser.cpp index 98f9fe7c..8401d251 100644 --- a/OPJViewer/source/wxj2kparser.cpp +++ b/OPJViewer/source/wxj2kparser.cpp @@ -554,6 +554,8 @@ void OPJParseThread::ParseJ2KFile(wxFile *m_file, wxFileOffset offset, wxFileOff ///////// case SIZ_VAL: { + int c; + if (m_file->Read(twobytes, 2) != 2) break; unsigned short int rsiz = STREAM_TO_UINT16(twobytes, 0); @@ -603,7 +605,7 @@ void OPJParseThread::ParseJ2KFile(wxFile *m_file, wxFileOffset offset, wxFileOff unsigned char *xrsiz = new unsigned char(csiz); unsigned char *yrsiz = new unsigned char(csiz); - for (int c = 0; c < csiz; c++) { + for (c = 0; c < csiz; c++) { if (m_file->Read(&ssiz[c], 1) != 1) break; -- cgit v1.2.3