aboutsummaryrefslogtreecommitdiffstats
path: root/libparsepcf_get_table_count.c
diff options
context:
space:
mode:
Diffstat (limited to 'libparsepcf_get_table_count.c')
-rw-r--r--libparsepcf_get_table_count.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libparsepcf_get_table_count.c b/libparsepcf_get_table_count.c
index 0eb8741..a5ece0e 100644
--- a/libparsepcf_get_table_count.c
+++ b/libparsepcf_get_table_count.c
@@ -3,14 +3,15 @@
int
-libparsepcf_get_table_count(const char *file, size_t size, size_t *countp)
+libparsepcf_get_table_count(const void *file, size_t size, size_t *countp)
{
+ const char *text = file;
uint32_t count;
- if (size < 8 || file[0] != 1 || file[1] != 'f' || file[2] != 'c' || file[3] != 'p')
+ if (size < 8 || text[0] != 1 || text[1] != 'f' || text[2] != 'c' || text[3] != 'p')
goto ebfont;
- count = libparsepcf_parse_lsb_uint32__(&file[4]);
+ count = libparsepcf_parse_lsb_uint32__(&text[4]);
if (count > (size - 8) / 16)
goto ebfont;