Commit a804cc71 authored by Alexandre Julliard's avatar Alexandre Julliard

jscript: Use the official Windows constant for MAXLONGLONG.

parent 0f03f264
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(jscript); WINE_DEFAULT_DEBUG_CHANNEL(jscript);
#define LONGLONG_MAX (((LONGLONG)0x7fffffff<<32)|0xffffffff)
static const WCHAR NaNW[] = {'N','a','N',0}; static const WCHAR NaNW[] = {'N','a','N',0};
static const WCHAR InfinityW[] = {'I','n','f','i','n','i','t','y',0}; static const WCHAR InfinityW[] = {'I','n','f','i','n','i','t','y',0};
static const WCHAR ArrayW[] = {'A','r','r','a','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 ...@@ -554,7 +552,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
while(isdigitW(*str)) { while(isdigitW(*str)) {
hlp = d*10 + *(str++) - '0'; hlp = d*10 + *(str++) - '0';
if(d>LONGLONG_MAX/10 || hlp<0) { if(d>MAXLONGLONG/10 || hlp<0) {
exp++; exp++;
break; break;
} }
...@@ -573,7 +571,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag ...@@ -573,7 +571,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
while(isdigitW(*str)) { while(isdigitW(*str)) {
hlp = d*10 + *(str++) - '0'; hlp = d*10 + *(str++) - '0';
if(d>LONGLONG_MAX/10 || hlp<0) if(d>MAXLONGLONG/10 || hlp<0)
break; break;
d = hlp; d = hlp;
......
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(jscript); 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 breakW[] = {'b','r','e','a','k',0};
static const WCHAR caseW[] = {'c','a','s','e',0}; static const WCHAR caseW[] = {'c','a','s','e',0};
static const WCHAR catchW[] = {'c','a','t','c','h',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 ...@@ -397,7 +395,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li
d = int_part; d = int_part;
while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) { while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
hlp = d*10 + *(ctx->ptr++) - '0'; hlp = d*10 + *(ctx->ptr++) - '0';
if(d>LONGLONG_MAX/10 || hlp<0) { if(d>MAXLONGLONG/10 || hlp<0) {
exp++; exp++;
break; break;
} }
...@@ -414,7 +412,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li ...@@ -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)) { while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) {
hlp = d*10 + *(ctx->ptr++) - '0'; hlp = d*10 + *(ctx->ptr++) - '0';
if(d>LONGLONG_MAX/10 || hlp<0) if(d>MAXLONGLONG/10 || hlp<0)
break; break;
d = hlp; d = hlp;
......
...@@ -742,6 +742,7 @@ typedef struct _MEMORY_BASIC_INFORMATION ...@@ -742,6 +742,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define MAXBYTE 0xff #define MAXBYTE 0xff
#define MAXWORD 0xffff #define MAXWORD 0xffff
#define MAXDWORD 0xffffffff #define MAXDWORD 0xffffffff
#define MAXLONGLONG (((LONGLONG)0x7fffffff << 32) | 0xffffffff)
#define UNICODE_STRING_MAX_CHARS 32767 #define UNICODE_STRING_MAX_CHARS 32767
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment