diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index a22a4df8f67..9e517c07833 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -63,7 +63,7 @@ typedef struct typedef struct { - int value; + unsigned short value; } ORD_ABS; typedef struct diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index f9ef406251b..3cf3722cf41 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -355,6 +355,11 @@ static int parse_spec_equate( ORDDEF *odp, DLLSPEC *spec ) error( "Expected number value, got '%s'\n", token ); return 0; } + if (value < -0x8000 || value > 0xffff) + { + error( "Value %d for absolute symbol doesn't fit in 16 bits\n", value ); + value = 0; + } odp->u.abs.value = value; return 1; }