Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
Irrlicht New
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Irrlicht New
Commits
0d883411
Commit
0d883411
authored
Feb 25, 2026
by
mercury233
Committed by
GitHub
Feb 25, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CZipReader error log (#21)
parent
174aa518
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
source/Irrlicht/CZipReader.cpp
source/Irrlicht/CZipReader.cpp
+9
-19
No files found.
source/Irrlicht/CZipReader.cpp
View file @
0d883411
...
@@ -521,7 +521,6 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -521,7 +521,6 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
//99 - AES encryption, WinZip 9
//99 - AES encryption, WinZip 9
const
SZipFileEntry
&
e
=
FileInfo
[
Files
[
index
].
ID
];
const
SZipFileEntry
&
e
=
FileInfo
[
Files
[
index
].
ID
];
wchar_t
buf
[
64
];
s16
actualCompressionMethod
=
e
.
header
.
CompressionMethod
;
s16
actualCompressionMethod
=
e
.
header
.
CompressionMethod
;
IReadFile
*
decrypted
=
0
;
IReadFile
*
decrypted
=
0
;
u8
*
decryptedBuf
=
0
;
u8
*
decryptedBuf
=
0
;
...
@@ -620,8 +619,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -620,8 +619,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
c8
*
pBuf
=
new
c8
[
uncompressedSize
];
c8
*
pBuf
=
new
c8
[
uncompressedSize
];
if
(
!
pBuf
)
if
(
!
pBuf
)
{
{
swprintf
(
buf
,
64
,
L"Not enough memory for decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Not enough memory for decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
if
(
decrypted
)
if
(
decrypted
)
decrypted
->
drop
();
decrypted
->
drop
();
return
0
;
return
0
;
...
@@ -633,8 +631,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -633,8 +631,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
pcData
=
new
u8
[
decryptedSize
];
pcData
=
new
u8
[
decryptedSize
];
if
(
!
pcData
)
if
(
!
pcData
)
{
{
swprintf
(
buf
,
64
,
L"Not enough memory for decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Not enough memory for decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
delete
[]
pBuf
;
delete
[]
pBuf
;
return
0
;
return
0
;
}
}
...
@@ -674,8 +671,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -674,8 +671,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
if
(
err
!=
Z_OK
)
if
(
err
!=
Z_OK
)
{
{
swprintf
(
buf
,
64
,
L"Error decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Error decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
delete
[]
pBuf
;
delete
[]
pBuf
;
return
0
;
return
0
;
}
}
...
@@ -694,8 +690,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -694,8 +690,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
c8
*
pBuf
=
new
c8
[
uncompressedSize
];
c8
*
pBuf
=
new
c8
[
uncompressedSize
];
if
(
!
pBuf
)
if
(
!
pBuf
)
{
{
swprintf
(
buf
,
64
,
L"Not enough memory for decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Not enough memory for decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
if
(
decrypted
)
if
(
decrypted
)
decrypted
->
drop
();
decrypted
->
drop
();
return
0
;
return
0
;
...
@@ -707,8 +702,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -707,8 +702,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
pcData
=
new
u8
[
decryptedSize
];
pcData
=
new
u8
[
decryptedSize
];
if
(
!
pcData
)
if
(
!
pcData
)
{
{
swprintf
(
buf
,
64
,
L"Not enough memory for decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Not enough memory for decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
delete
[]
pBuf
;
delete
[]
pBuf
;
return
0
;
return
0
;
}
}
...
@@ -745,8 +739,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -745,8 +739,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
if
(
err
!=
BZ_OK
)
if
(
err
!=
BZ_OK
)
{
{
swprintf
(
buf
,
64
,
L"Error decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Error decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
delete
[]
pBuf
;
delete
[]
pBuf
;
return
0
;
return
0
;
}
}
...
@@ -766,8 +759,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -766,8 +759,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
c8
*
pBuf
=
new
c8
[
uncompressedSize
];
c8
*
pBuf
=
new
c8
[
uncompressedSize
];
if
(
!
pBuf
)
if
(
!
pBuf
)
{
{
swprintf
(
buf
,
64
,
L"Not enough memory for decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Not enough memory for decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
if
(
decrypted
)
if
(
decrypted
)
decrypted
->
drop
();
decrypted
->
drop
();
return
0
;
return
0
;
...
@@ -779,8 +771,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -779,8 +771,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
pcData
=
new
u8
[
decryptedSize
];
pcData
=
new
u8
[
decryptedSize
];
if
(
!
pcData
)
if
(
!
pcData
)
{
{
swprintf
(
buf
,
64
,
L"Not enough memory for decompressing %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"Not enough memory for decompressing"
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
delete
[]
pBuf
;
delete
[]
pBuf
;
return
0
;
return
0
;
}
}
...
@@ -826,8 +817,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
...
@@ -826,8 +817,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
os
::
Printer
::
log
(
"Decryption support not enabled. File cannot be read."
,
ELL_ERROR
);
os
::
Printer
::
log
(
"Decryption support not enabled. File cannot be read."
,
ELL_ERROR
);
return
0
;
return
0
;
default:
default:
swprintf
(
buf
,
64
,
L"file has unsupported compression method. %s"
,
Files
[
index
].
FullName
.
c_str
()
);
os
::
Printer
::
log
(
"file has unsupported compression method."
,
Files
[
index
].
FullName
,
ELL_ERROR
);
os
::
Printer
::
log
(
buf
,
ELL_ERROR
);
return
0
;
return
0
;
};
};
...
...
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