Skip to content

Don't use unsafe strcpy#95

Merged
DanielaOrtner merged 1 commit into
RebelToolbox:mainfrom
madmiraal:fix-c4996
Aug 24, 2024
Merged

Don't use unsafe strcpy#95
DanielaOrtner merged 1 commit into
RebelToolbox:mainfrom
madmiraal:fix-c4996

Conversation

@madmiraal
Copy link
Copy Markdown
Contributor

Fixes Visual Studio throwing a C4996 warning: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead at core\ustring.cpp(131).

Also ensures that resizing the storage was successful before trying to copy the data.

Rebel version of godotengine/godot#33731

@madmiraal madmiraal added the PR Type: Bug Fix Your current game should now work as expected. label Aug 24, 2024
@DanielaOrtner DanielaOrtner self-requested a review August 24, 2024 10:19
Copy link
Copy Markdown
Contributor

@DanielaOrtner DanielaOrtner left a comment

Choose a reason for hiding this comment

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

Thanks for this fix!

@DanielaOrtner DanielaOrtner merged commit a7041f3 into RebelToolbox:main Aug 24, 2024
@madmiraal madmiraal deleted the fix-c4996 branch August 25, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR Type: Bug Fix Your current game should now work as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants