From c45326295a4bfb93440f95cc23de827a0cdd7045 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Mon, 11 Mar 2019 22:19:12 +0000 Subject: [PATCH] Minor Font.cpp cleanup --- src/Font.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index b06ada6a..197e13d8 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -1628,8 +1628,7 @@ static unsigned short ShiftJISToUnicode(const unsigned char *string, unsigned in return shiftjis_to_unicode_lookup[string[0]]; } - lookup_index += (string[0] & 0xF) * 0x100; - lookup_index += string[1]; + lookup_index += ((string[0] << 8) | string[1]) & 0xFFF; if (bytes_read != NULL) *bytes_read = 2;