Skip to content

Conversation

wallacegibbon
Copy link

@wallacegibbon wallacegibbon commented Oct 20, 2025

The GetRed, GetBlue, GetGreen in wxWidgets return unsigned char, But the code in wxe_wrapper_4 is using char to receive the result and sign extending it into a int.

As a result, a pixel whose red is 250(16#FA) will be returned as 4294967290(16#FFFFFFFA) by wxImage:getRed/3.

This commit fixed this problem.

Copy link
Contributor

CT Test Results

Tests are running... https://github.com/erlang/otp/actions/runs/18640769744

Results for commit 25d6bb3

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

  • No CT logs found
  • No HTML docs found
  • No Windows Installer found

// Erlang/OTP Github Action Bot

The GetRed, GetBlue, GetGreen in wxWidgets return `unsigned char`,
But the code in wxe_wrapper_4.cpp is using `char` to receive the result
and sign extending it into a int.

As a result, a pixel whose red is `250`(`16#FA`) will be returned as
`4294967290`(`16#FFFFFFFA`) by `wxImage:getRed/3`.

This commit fixed this problem.
@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants