mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-26 18:15:40 +00:00
Fix sign-compare error
I just noticed that on my compiler; probably due to recent version, not sure.
This commit is contained in:
parent
92658df379
commit
7227a0913f
@ -226,7 +226,7 @@ template <class T> class section_impl : public section
|
||||
stream.seekg(
|
||||
( *translator )[( *convertor )( header.sh_offset )] );
|
||||
stream.read( data, size );
|
||||
if (stream.gcount() != size) {
|
||||
if (static_cast<Elf_Xword>(stream.gcount()) != size) {
|
||||
delete[] data;
|
||||
data = nullptr;
|
||||
return false;
|
||||
|
@ -185,7 +185,7 @@ template <class T> class segment_impl : public segment
|
||||
|
||||
if ( nullptr != data ) {
|
||||
stream.read( data, size );
|
||||
if (stream.gcount() != size) {
|
||||
if (static_cast<Elf_Xword>(stream.gcount()) != size) {
|
||||
delete[] data;
|
||||
data = nullptr;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user