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

Fix some compile warnings spewed by MSVC x64 #4855

Merged
merged 3 commits into from
Oct 2, 2021
Merged

Fix some compile warnings spewed by MSVC x64 #4855

merged 3 commits into from
Oct 2, 2021

Conversation

stenzek
Copy link
Member

@stenzek stenzek commented Oct 1, 2021

Description of Changes

These have been pestering me for a while.

Rationale behind Changes

Making MSVC shush.

Suggested Testing Steps

Shouldn't be any functional changes here.

int srcfn_len = strlen( srcfile );
if( srcfile[srcfn_len-4] != '.' )
const size_t srcfn_len = strlen( srcfile );
if( srcfn_len < 0 || srcfile[srcfn_len-4] != '.' )
Copy link
Member

Choose a reason for hiding this comment

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

size_t is unsigned, checking if less than 0

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops, that was meant to be a 4 (to avoid the buffer underflow).

@tadanokojin tadanokojin merged commit 2241e63 into PCSX2:master Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants