Global: Cleanup initialization/pointer checks.

Cleaning up a lot of cases of uninitialized data, unchecked return values
for failures, and similar.
This commit is contained in:
Unknown W. Brackets committed 2022-12-10 21:13:36 -08:00
1 parent a7b7bf7826
commit 9cfcbc46e6
41 files changed
+190 -138

No files matched your search

+5 -3
View File
@@ -127,9 +127,9 @@ bool SymbolMap::LoadSymbolMap(const Path &filename) {
if (!started) continue;
u32 address = -1, size, vaddress = -1;
u32 address = -1, size = 0, vaddress = -1;
int moduleIndex = 0;
int typeInt;
int typeInt = ST_NONE;
SymbolType type;
char name[128] = {0};
@@ -145,7 +145,9 @@ bool SymbolMap::LoadSymbolMap(const Path &filename) {
continue;
}
sscanf(line, "%08x %08x %x %i %127c", &address, &size, &vaddress, &typeInt, name);
int matched = sscanf(line, "%08x %08x %x %i %127c", &address, &size, &vaddress, &typeInt, name);
if (matched < 1)
continue;
type = (SymbolType) typeInt;
if (!hasModules) {
if (!Memory::IsValidAddress(vaddress)) {