Fix build

Change-Id: I0d3e3afc7262688e3bc90672766e6e7d263f06b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3884
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Máximo Castañeda
2021-04-23 11:33:23 +00:00
committed by Adrien Destugues
parent 63046071f9
commit 8f16317a5b
+3 -2
View File
@@ -367,8 +367,9 @@ SettingsMessage::GetValue(const char* name, uint32 defaultValue) const
if (FindUInt32(name, &value) == B_OK)
return value;
// For compatibility with older versions of this class, also accept an int32
if (FindInt32(name, &value) == B_OK)
return value;
int32 signed_value;
if (FindInt32(name, &signed_value) == B_OK && signed_value >= 0)
return signed_value;
return defaultValue;
}