Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b4cf3790e795d1117a905624cacd5eb3a6d8a2d2
https://github.com/WebKit/WebKit/commit/b4cf3790e795d1117a905624cacd5eb3a6d8a2d2
Author: Yijia Huang <[email protected]>
Date: 2025-02-13 (Thu, 13 Feb 2025)
Changed paths:
M Source/WTF/wtf/EnumTraits.h
Log Message:
-----------
[WTF] Fix implicit conversion issue in enumNamesMax defaultMax calculation
https://bugs.webkit.org/show_bug.cgi?id=287645
rdar://144799887
Reviewed by Chris Dumez.
Fixes an implicit conversion issue where assigning `UINT8_MAX` (255)
to `Underlying` (int8_t) caused an overflow, leading to an incorrect
value of `-1`.
Now explicitly casting `defaultMax` to `Underlying` to ensure that
signed types use `INT8_MAX` and unsigned types use `UINT8_MAX`
without unexpected wraparounds.
* Source/WTF/wtf/EnumTraits.h:
(WTF::enumNamesMax):
Canonical link: https://commits.webkit.org/290354@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes