Fix 32 bits negative values YAML saving
This commit is contained in:
committed by
Peter Feerick
parent
c1e8a54e59
commit
c103abb58b
@@ -244,7 +244,7 @@ char* yaml_rgb2hex(uint32_t i)
|
||||
|
||||
int32_t yaml_to_signed(uint32_t i, uint32_t bits)
|
||||
{
|
||||
if (i & (1 << (bits-1))) {
|
||||
if (bits < 32 && (i & (1 << (bits-1)))) {
|
||||
i |= 0xFFFFFFFF << bits;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user