mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-05 19:15:05 +00:00
[settings] Fix erroneous bit-masking in fetch_uintz_setting()
This commit is contained in:
parent
3961c1ca02
commit
c5a88ed553
@ -544,7 +544,8 @@ int fetch_uint_setting ( struct settings *settings, struct setting *setting,
|
||||
return len;
|
||||
|
||||
/* Mask off sign-extended bits */
|
||||
*value = ( svalue & ( -1UL >> ( sizeof ( long ) - len ) ) );
|
||||
assert ( len <= ( int ) sizeof ( long ) );
|
||||
*value = ( svalue & ( -1UL >> ( 8 * ( sizeof ( long ) - len ) ) ) );
|
||||
|
||||
return len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user