Skip to content
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

38 cant use a static message buffer #39

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

martin-olivier
Copy link
Owner

@martin-olivier martin-olivier commented Jun 1, 2022

The static buffer in _get_error windows function has been removed to avoid concurrency errors

@martin-olivier martin-olivier linked an issue Jun 1, 2022 that may be closed by this pull request
@martin-olivier martin-olivier self-assigned this Jun 1, 2022
@martin-olivier martin-olivier added the bug Something isn't working label Jun 1, 2022
@martin-olivier martin-olivier merged commit e1ab7d0 into dev Jun 2, 2022
@martin-olivier martin-olivier deleted the 38-cant-use-a-static-message-buffer branch June 2, 2022 07:32
auto error_code = GetLastError();
if (!error_code)
return nullptr;
static char msg[buf_size];
char msg[512];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bug. You are now returning a pointer to a local variable which goes out of scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use a static message buffer
2 participants