PPCSymbolDB: Do not truncate fixed size symbols

Fix comparison warning
This commit is contained in:
Sepalani
2018-04-10 09:58:35 +04:00
parent 9b8866ba78
commit 7d36165489
4 changed files with 12 additions and 5 deletions

View File

@ -68,6 +68,13 @@ void PPCSymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const std::string& nam
if (tf.type == Symbol::Type::Function)
{
PPCAnalyst::AnalyzeFunction(startAddr, tf, size);
// Do not truncate symbol when a size is expected
if (size != 0 && tf.size != size)
{
WARN_LOG(SYMBOLS, "Analysed symbol (%s) size mismatch, %u expected but %u computed",
name.c_str(), size, tf.size);
tf.size = size;
}
checksumToFunction[tf.hash].insert(&functions[startAddr]);
}
else