Skip to content

Commit

Permalink
Fix int8_t storage in BitPropVariant on Arm architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Jan 17, 2025
1 parent ffe6db6 commit f64610e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/bit7z/bitwindows.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ struct PROPVARIANT {
WORD wReserved2;
WORD wReserved3;
union {
#if defined( __arm__ ) || defined( __aarch64__ )
signed char cVal;
#else
char cVal;
#endif
unsigned char bVal;
short iVal;
unsigned short uiVal;
Expand Down
2 changes: 1 addition & 1 deletion src/bitpropvariant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ BitPropVariant::BitPropVariant( uint64_t value ) noexcept: PROPVARIANT() {
BitPropVariant::BitPropVariant( int8_t value ) noexcept: PROPVARIANT() {
vt = VT_I1;
wReserved1 = 0;
cVal = static_cast< char >( value );
cVal = static_cast< decltype(cVal) >( value );
}

BitPropVariant::BitPropVariant( int16_t value ) noexcept: PROPVARIANT() {
Expand Down

0 comments on commit f64610e

Please sign in to comment.