Setting a negative value for a uint GObject property should trigger a warning
Submitted by Rory MacQueen
Link to original bug (#777240)
Description
Created attachment 343463 An example of negative value getting silently cast as MAXUINT
Assigning a negative value to a property whose type is an uint should trigger a warning, not silently underflow the value to MAX_UINT. I've noticed this behaviour happens when the property type is uint and the max value is set to GLib.MAXUINT32
. Changing the max value for the property to be GLib.MAXINT32
(signed max int) and then setting the value to be negative does indeed trigger a warning.
See attached example.
Attachment 343463, "An example of negative value getting silently cast as MAXUINT":
underflow.js