From c6c821a0f7b47370d13168327c9b9c39a1626fb9 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 12 Aug 2013 23:33:11 -0700 Subject: [PATCH] Fix some unitinialized values. --- Core/Debugger/SymbolMap.cpp | 4 ++-- Core/FileSystems/DirectoryFileSystem.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/Debugger/SymbolMap.cpp b/Core/Debugger/SymbolMap.cpp index ea23ca0fe2..b3fa7a9145 100644 --- a/Core/Debugger/SymbolMap.cpp +++ b/Core/Debugger/SymbolMap.cpp @@ -152,7 +152,7 @@ bool SymbolMap::LoadSymbolMap(const char *filename) while (!feof(f)) { - char line[512],temp[256]; + char line[512], temp[256] = {0}; char *p = fgets(line,512,f); if(p == NULL) break; @@ -233,7 +233,7 @@ bool SymbolMap::LoadNocashSym(const char *filename) while (!feof(f)) { - char line[256],value[256]; + char line[256], value[256] = {0}; char *p = fgets(line,256,f); if(p == NULL) break; diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 293c40cc70..a770fabc4c 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -243,7 +243,7 @@ bool DirectoryFileHandle::Open(std::string& basePath, std::string& fileName, Fil size_t DirectoryFileHandle::Read(u8* pointer, s64 size) { - size_t bytesRead; + size_t bytesRead = 0; #ifdef _WIN32 ::ReadFile(hFile, (LPVOID)pointer, (DWORD)size, (LPDWORD)&bytesRead, 0); #else @@ -254,7 +254,7 @@ size_t DirectoryFileHandle::Read(u8* pointer, s64 size) size_t DirectoryFileHandle::Write(const u8* pointer, s64 size) { - size_t bytesWritten; + size_t bytesWritten = 0; #ifdef _WIN32 ::WriteFile(hFile, (LPVOID)pointer, (DWORD)size, (LPDWORD)&bytesWritten, 0); #else