• Philipp Stephani's avatar
    Remove some undefined behavior related to left shifts. · 00c99491
    Philipp Stephani authored
    Found by UBSan.
    
    * src/nsfns.m (ns_set_foreground_color, ns_set_background_color):
    * src/nsimage.m (getPixelAtX:Y:):
    * src/nsterm.m (ns_color_index_to_rgba): Add explicit casts to avoid
    undefined behavior when left-shifting beyond the bounds of the int
    type.
    
    * src/macfont.m (METRICS_VALUE): Add explicit casts to avoid undefined
    behavior when left-shifting a negative value.
    00c99491
nsterm.m 288 KB