Fix char signedness in glyph offset calculation, fixes #2137
authorGiovanni Panozzo <giovanni@panozzo.it>
Sun, 21 Feb 2016 16:52:52 +0000 (17:52 +0100)
committerGiovanni Panozzo <giovanni@panozzo.it>
Sun, 21 Feb 2016 17:15:32 +0000 (18:15 +0100)
libfreerdp/cache/glyph.c

index 0157d40..412c114 100644 (file)
@@ -57,7 +57,7 @@ void update_process_glyph(rdpContext* context, BYTE* data, int* index,
 
                if (offset & 0x80)
                {
-                       offset = data[*index + 1] | ((int)((char)data[*index + 2]) << 8);
+                       offset = data[*index + 1] | ((int)((signed char)data[*index + 2]) << 8);
                        (*index)++;
                        (*index)++;
                }