From e904bf3b073a2e6465079779a50711aee8e4da38 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 25 Oct 2000 20:31:51 +0000 Subject: [PATCH] 16-bit resource size must be scaled by alignment. --- tools/wrc/writeres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/wrc/writeres.c b/tools/wrc/writeres.c index 8b6427f4e8c..b67b29b7170 100644 --- a/tools/wrc/writeres.c +++ b/tools/wrc/writeres.c @@ -767,7 +767,7 @@ static void write_ne_segment(FILE *fp, resource_t *top) alignment_pwr); /* Length */ fprintf(fp, "\t.short\t%d\n", - rcp->rscarray[j]->binres->size - rcp->rscarray[j]->binres->dataidx); + (rcp->rscarray[j]->binres->size - rcp->rscarray[j]->binres->dataidx + alignment - 1) >> alignment_pwr); /* Flags */ fprintf(fp, "\t.short\t0x%04x\n", (WORD)rcp->rscarray[j]->memopt); /* Id */