Fix VS2015 warnings

This commit is contained in:
kaetemi 2016-01-15 11:52:09 +01:00
parent deba711e0c
commit a8e56fed23
3 changed files with 6 additions and 6 deletions

View file

@ -864,18 +864,18 @@ public:
else if(type == "int")
{
if (!IsBadReadPtr(addr,sizeof(int)))
sprintf (tmp, "%d", *addr);
sprintf (tmp, "%p", (void *)(*addr));
}
else if (type == "char")
{
if (!IsBadReadPtr(addr,sizeof(char)))
if (nlisprint(*addr))
{
sprintf (tmp, "'%c'", *addr);
sprintf (tmp, "'%c'", (char)((*addr) & 0xFF));
}
else
{
sprintf (tmp, "%d", *addr);
sprintf (tmp, "%p", (void *)(*addr));
}
}
else if (type == "char*")
@ -932,7 +932,7 @@ public:
if(*addr == 0)
sprintf (tmp, "<NULL>");
else
sprintf (tmp, "0x%p", *addr);
sprintf (tmp, "0x%p", (void *)*addr);
}
}

View file

@ -945,7 +945,7 @@ CEvalNumExpr::TReturnState CEvalNumExpr::evalExpression (double &finalResult, TT
value = (double)(uint)((floor (value+0.5)==0.0));
break;
case Tilde:
value = (double)~((uint)floor (value+0.5));
value = (double)(~((uint)floor (value+0.5)) & std::numeric_limits<uint>::max());
break;
case Minus:
value = -value;

View file

@ -99,7 +99,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr)
if (stop==0 && (parse[i] == ',' || parse[i] == ')'))
{
char tmp[32];
sprintf(tmp, "=0x%p", *((DWORD_TYPE*)(stackAddr) + 2 + pos++));
sprintf(tmp, "=0x%p", (void *)(*((DWORD_TYPE*)(stackAddr) + 2 + pos++)));
str += tmp;
}
str += parse[i];