Explorar o código

stb_truetype: Fix sign error in CFF push immediate

Dougall Johnson %!s(int64=8) %!d(string=hai) anos
pai
achega
84fd09ea53
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      stb_truetype.h

+ 1 - 1
stb_truetype.h

@@ -2172,7 +2172,7 @@ static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, st
 
 
          // push immediate
          // push immediate
          if (b0 == 255) {
          if (b0 == 255) {
-            f = (float)stbtt__buf_get32(&b) / 0x10000;
+            f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000;
          } else {
          } else {
             stbtt__buf_skip(&b, -1);
             stbtt__buf_skip(&b, -1);
             f = (float)(stbtt_int16)stbtt__cff_int(&b);
             f = (float)(stbtt_int16)stbtt__cff_int(&b);