Make sure that values of absolute symbols fit in 16 bits.

This commit is contained in:
Alexandre Julliard 2005-09-21 11:10:54 +00:00
parent 102617f186
commit 210bd2dd94
2 changed files with 6 additions and 1 deletions

View File

@ -63,7 +63,7 @@ typedef struct
typedef struct
{
int value;
unsigned short value;
} ORD_ABS;
typedef struct

View File

@ -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;
}