Skip to content

Fix some compile warnings spewed by MSVC x64 - #4855

Merged
tadanokojin merged 3 commits into
PCSX2:masterfrom
stenzek:msvc-x64-warnings-fix
Oct 2, 2021
Merged

Fix some compile warnings spewed by MSVC x64#4855
tadanokojin merged 3 commits into
PCSX2:masterfrom
stenzek:msvc-x64-warnings-fix

Conversation

@stenzek

@stenzek stenzek commented Oct 1, 2021

Copy link
Copy Markdown
Contributor

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.

Comment thread tools/bin2cpp/bin2cpp.cpp Outdated
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
Copy Markdown
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
Copy Markdown
Contributor 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.

3 participants