diff options
author | Mattias Andrée <m@maandree.se> | 2024-10-13 11:17:48 +0200 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2024-10-13 11:17:48 +0200 |
commit | a81c96c0348af8caf6ae45e2d942a676792a2a31 (patch) | |
tree | 24cc725efa3eba381c98ebed7cb2cbf7e0e34f0c /libparsepcf_get_table_count.c | |
parent | Update e-mail (diff) | |
download | libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.gz libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.bz2 libparsepcf-a81c96c0348af8caf6ae45e2d942a676792a2a31.tar.xz |
Documentation and minor improvements
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libparsepcf_get_table_count.c')
-rw-r--r-- | libparsepcf_get_table_count.c | 7 |
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; |