cid: Fix some data types mismatching with their sources.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/ChangeLog b/ChangeLog
index 5bd9b5a..7dec4a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ cid: Fix some data types mismatching with their sources.
+
+ * src/cid/cidparse.c (cid_parser_new): The types of
+ `read_len' and `stream_len' are matched to
+ FT_Stream->size. Unrequired cast is removed.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
cff: Fix for unused variable `rest'.
* src/cff/cffparse.c (cff_parse_real): Insert
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index 92aa154..efed618 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -86,13 +86,13 @@
/* `StartData' or `/sfnts' */
{
FT_Byte buffer[256 + 10];
- FT_Int read_len = 256 + 10;
+ FT_Long read_len = 256 + 10; /* same as signed FT_Stream->size */
FT_Byte* p = buffer;
- for ( offset = (FT_ULong)FT_STREAM_POS(); ; offset += 256 )
+ for ( offset = FT_STREAM_POS(); ; offset += 256 )
{
- FT_Int stream_len;
+ FT_Long stream_len; /* same as signed FT_Stream->size */
stream_len = stream->size - FT_STREAM_POS();