Skip to content

createFont() changes char array #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
processing-bot opened this issue May 20, 2021 · 2 comments
Closed

createFont() changes char array #197

processing-bot opened this issue May 20, 2021 · 2 comments

Comments

@processing-bot
Copy link
Collaborator

Created by: ertdfgcvb

Description

When passing a char[] as last parameter to createFont() the array is changed (sorted?) in place.

Expected Behavior

The array shouldn't be touched by the function.

Steps to Reproduce

void setup(){
    char[] c = {'c', 'b', 'a'};
    PFont f = createFont("Helvetica", 16, false, c);    
    println(c);
}
[0] 'a'
[1] 'b'
[2] 'c'

Your Environment

  • Processing version:
    4.0a3
  • Operating System and OS version:
  • MacOS 10.15.7
@processing-bot
Copy link
Collaborator Author

Created by: benfry

Yikes, yeah—bad practice. Thanks for identifying the problem and fixing.

Merged and updated for 4.0a4.

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant