jscript: Use the official Windows constant for MAXLONGLONG.
This commit is contained in:
parent
0f03f264b7
commit
a804cc711b
|
@ -29,8 +29,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
#define LONGLONG_MAX (((LONGLONG)0x7fffffff<<32)|0xffffffff)
|
||||
|
||||
static const WCHAR NaNW[] = {'N','a','N',0};
|
||||
static const WCHAR InfinityW[] = {'I','n','f','i','n','i','t','y',0};
|
||||
static const WCHAR ArrayW[] = {'A','r','r','a','y',0};
|
||||
|
@ -554,7 +552,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
|
|||
|
||||
while(isdigitW(*str)) {
|
||||
hlp = d*10 + *(str++) - '0';
|
||||
if(d>LONGLONG_MAX/10 || hlp<0) {
|
||||
if(d>MAXLONGLONG/10 || hlp<0) {
|
||||
exp++;
|
||||
break;
|
||||
}
|
||||
|
@ -573,7 +571,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
|
|||
|
||||
while(isdigitW(*str)) {
|
||||
hlp = d*10 + *(str++) - '0';
|
||||
if(d>LONGLONG_MAX/10 || hlp<0)
|
||||
if(d>MAXLONGLONG/10 || hlp<0)
|
||||
break;
|
||||
|
||||
d = hlp;
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
#define LONGLONG_MAX (((LONGLONG)0x7fffffff<<32)|0xffffffff)
|
||||
|
||||
static const WCHAR breakW[] = {'b','r','e','a','k',0};
|
||||
static const WCHAR caseW[] = {'c','a','s','e',0};
|
||||
static const WCHAR catchW[] = {'c','a','t','c','h',0};
|
||||
|
@ -397,7 +395,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li
|
|||
d = int_part;
|
||||
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
|
||||
hlp = d*10 + *(ctx->ptr++) - '0';
|
||||
if(d>LONGLONG_MAX/10 || hlp<0) {
|
||||
if(d>MAXLONGLONG/10 || hlp<0) {
|
||||
exp++;
|
||||
break;
|
||||
}
|
||||
|
@ -414,7 +412,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li
|
|||
|
||||
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
|
||||
hlp = d*10 + *(ctx->ptr++) - '0';
|
||||
if(d>LONGLONG_MAX/10 || hlp<0)
|
||||
if(d>MAXLONGLONG/10 || hlp<0)
|
||||
break;
|
||||
|
||||
d = hlp;
|
||||
|
|
|
@ -742,6 +742,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
|||
#define MAXBYTE 0xff
|
||||
#define MAXWORD 0xffff
|
||||
#define MAXDWORD 0xffffffff
|
||||
#define MAXLONGLONG (((LONGLONG)0x7fffffff << 32) | 0xffffffff)
|
||||
|
||||
#define UNICODE_STRING_MAX_CHARS 32767
|
||||
|
||||
|
|
Loading…
Reference in New Issue