diff --git a/orders.c b/orders.c index 18994bc..fa4f3d6 100644 --- a/orders.c +++ b/orders.c @@ -56,12 +56,12 @@ rdp_in_present(STREAM s, uint32 * present, uint8 flags, int size) static void rdp_in_coord(STREAM s, uint16 * coord, BOOL delta) { - uint8 change; + sint8 change; if (delta) { in_uint8(s, change); - *coord += (signed char) change; + *coord += change; } else { diff --git a/types.h b/types.h index 7b83b47..9954592 100644 --- a/types.h +++ b/types.h @@ -26,8 +26,11 @@ typedef int BOOL; #endif typedef unsigned char uint8; +typedef signed char sint8; typedef unsigned short uint16; +typedef signed short sint16; typedef unsigned int uint32; +typedef signed int sint32; typedef void *HBITMAP; typedef void *HGLYPH; @@ -82,8 +85,8 @@ BRUSH; typedef struct _FONTGLYPH { - uint16 offset; - uint16 baseline; + sint16 offset; + sint16 baseline; uint16 width; uint16 height; HBITMAP pixmap; diff --git a/xwin.c b/xwin.c index 5c6c25c..bdcf3e7 100644 --- a/xwin.c +++ b/xwin.c @@ -1216,8 +1216,8 @@ ui_draw_glyph(int mixmode, }\ if (glyph != NULL)\ {\ - ui_draw_glyph (mixmode, x + (short) glyph->offset,\ - y + (short) glyph->baseline,\ + ui_draw_glyph (mixmode, x + glyph->offset,\ + y + glyph->baseline,\ glyph->width, glyph->height,\ glyph->pixmap, 0, 0, bgcolour, fgcolour);\ if (flags & TEXT2_IMPLICIT_X)\