From 7f27eb6a451510ceefa91b71f9d6cd8e152df9b1 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Tue, 22 Nov 2011 22:25:37 +0000 Subject: [PATCH] widl: Avoid right-shift of negative values. --- tools/widl/typegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index cadbef28334..c1b53022c97 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2379,8 +2379,8 @@ static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff) print_file(file, 2, "0x%x,\t/* FIXME: always FC_LONG */\n", RPC_FC_LONG); write_conf_or_var_desc(file, current_structure, offset, ft, get_attrp(f->attrs, ATTR_SWITCHIS)); - print_file(file, 2, "NdrFcShort(%hd),\t/* Offset= %hd (%u) */\n", - reloff, reloff, absoff); + print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", + (unsigned short)reloff, reloff, absoff); *tfsoff += 8; } offset += size; -- 2.11.4.GIT