winedump: Fixed minidump processor revision decoding (Coverity).

This commit is contained in:
Marcus Meissner 2011-05-05 15:27:06 +02:00 committed by Alexandre Julliard
parent 15a3bd9c79
commit 16d13f24a0
2 changed files with 11 additions and 11 deletions

View file

@ -238,18 +238,18 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
strcat(tmp, str);
if (msi->ProcessorLevel == 3 || msi->ProcessorLevel == 4)
{
if (HIWORD(msi->ProcessorRevision) == 0xFF)
if (HIBYTE(msi->ProcessorRevision) == 0xFF)
sprintf(tmp + strlen(tmp), " (%c%d)",
'A' + HIBYTE(LOWORD(msi->ProcessorRevision)),
LOBYTE(LOWORD(msi->ProcessorRevision)));
'A' + ((msi->ProcessorRevision>>4)&0xf)-0x0a,
((msi->ProcessorRevision&0xf)));
else
sprintf(tmp + strlen(tmp), " (%c%d)",
'A' + HIWORD(msi->ProcessorRevision),
LOWORD(msi->ProcessorRevision));
'A' + HIBYTE(msi->ProcessorRevision),
LOBYTE(msi->ProcessorRevision));
}
else sprintf(tmp + strlen(tmp), " (%d.%d)",
HIWORD(msi->ProcessorRevision),
LOWORD(msi->ProcessorRevision));
HIBYTE(msi->ProcessorRevision),
LOBYTE(msi->ProcessorRevision));
str = tmp;
break;
case PROCESSOR_ARCHITECTURE_MIPS:

View file

@ -267,12 +267,12 @@ void mdmp_dump(void)
strcat(tmp, " (");
if (msi->ProcessorLevel == 3 || msi->ProcessorLevel == 4)
{
if (HIWORD(msi->ProcessorRevision) == 0xFF)
sprintf(tmp + strlen(tmp), "%c%d", 'A' + HIBYTE(LOWORD(msi->ProcessorRevision)), LOBYTE(LOWORD(msi->ProcessorRevision)));
if (HIBYTE(msi->ProcessorRevision) == 0xFF)
sprintf(tmp + strlen(tmp), "%c%d", 'A' + ((msi->ProcessorRevision>>4)&0xf)-0x0a, msi->ProcessorRevision&0xf);
else
sprintf(tmp + strlen(tmp), "%c%d", 'A' + HIWORD(msi->ProcessorRevision), LOWORD(msi->ProcessorRevision));
sprintf(tmp + strlen(tmp), "%c%d", 'A' + HIBYTE(msi->ProcessorRevision), LOBYTE(msi->ProcessorRevision));
}
else sprintf(tmp + strlen(tmp), "%d.%d", HIWORD(msi->ProcessorRevision), LOWORD(msi->ProcessorRevision));
else sprintf(tmp + strlen(tmp), "%d.%d", HIBYTE(msi->ProcessorRevision), LOBYTE(msi->ProcessorRevision));
str = tmp;
break;
case PROCESSOR_ARCHITECTURE_MIPS: