Small fixes (#2314)

* Assign the null pointer

* Initialize variable

* Fix while-conditions
This commit is contained in:
Johan Mattsson 2022-12-05 10:03:48 +01:00 committed by GitHub
parent 6b04b908bf
commit c100d527fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -1115,7 +1115,7 @@ static void lq2xS_32_def(uint32* dst0, uint32* dst1, const uint32* src0, const u
unsigned i;
for (i = 0; i < count; ++i) {
unsigned char mask;
unsigned char mask = 0;
uint32 c[9];

View File

@ -258,7 +258,7 @@ void CProjectSupport::LoadSupportInfo(void)
if (hKeyResults != nullptr)
{
RegCloseKey(hKeyResults);
nullptr;
hKeyResults = nullptr;
}
std::vector<uint8_t> OutData;

View File

@ -1329,19 +1329,19 @@ bool InsertNoteFile( LPBYTE aMemPak, LPCTSTR pszFileName )
int len = lstrlenA( szLine );
i = 16;
while(( szLine[i] != '}' ) && (i < len))
while((i < len) && ( szLine[i] != '}' ))
i++;
szLine[i] = '\0';
i += ReverseNotesA( &szLine[16], &pBlock[12] );
while(( szLine[i] != '{' ) && (i < len))
while((i < len) && ( szLine[i] != '{' ))
i++;
if(i < len)
{
int start = i+1;
while(( szLine[i] != '}' ) && (i < len))
while((i < len) && ( szLine[i] != '}' ))
i++;
if(i < len)
{
@ -1350,7 +1350,7 @@ bool InsertNoteFile( LPBYTE aMemPak, LPCTSTR pszFileName )
}
}
while(( szLine[i] != '}' ) && (i < len))
while((i < len) && ( szLine[i] != '}' ))
i++;
szLine[i] = '\0';