avoid undefined behavior from token paste resulting in more than one token

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2008-01-09 07:35:14 +00:00
parent 162e998c2f
commit 94eff479bf
2 changed files with 3 additions and 6 deletions

View File

@@ -928,7 +928,7 @@ typedef wxUint32 wxDword;
#define wxINT64_MIN LLONG_MIN
#else
#define wxINT64_MAX wxLL(9223372036854775807)
#define wxINT64_MIN wxLL(-9223372036854775807-1)
#define wxINT64_MIN (wxLL(-9223372036854775807)-1)
#endif
/*

View File

@@ -1039,12 +1039,9 @@ static wxLongLong_t wxCRT_DoStrtoll(const T* nptr, T** endptr, int base)
if ( sign == wxT('-') )
{
if ( uval <= wxULL(wxINT64_MAX+1) )
if (uval <= (wxULongLong_t)wxINT64_MAX + 1)
{
if ( uval == wxULL(wxINT64_MAX+1))
val = -((wxLongLong_t)wxINT64_MAX) - 1;
else
val = -((wxLongLong_t)uval);
val = -(wxLongLong_t)uval;
}
else
{