diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-08-29 12:24:43 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-08-29 12:24:43 +0100 |
commit | 45efd2585a00e3410991f33e7103ed66a1b328e7 (patch) | |
tree | 29ef1eec8a567e2b81a77168d89aaa35b3d943d0 | |
parent | 04bf43f88f1d64f64ac8ccf60f156d01e49669eb (diff) | |
download | uboxlib-dos-45efd2585a00e3410991f33e7103ed66a1b328e7.tar.gz uboxlib-dos-45efd2585a00e3410991f33e7103ed66a1b328e7.zip |
Use uint8_t instead of char
-rw-r--r-- | include/ubox_assets.h | 2 | ||||
-rw-r--r-- | src/assets.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/ubox_assets.h b/include/ubox_assets.h index c2dcf65..e6f4292 100644 --- a/include/ubox_assets.h +++ b/include/ubox_assets.h @@ -11,7 +11,7 @@ * 3. call ubox_assets_free to discard the DIR (and pak file if exists). */ uint8_t ubox_assets_init(const char *dirname); -uint8_t ubox_assets_read(const char *name, char **data, size_t *data_size); +uint8_t ubox_assets_read(const char *name, uint8_t **data, size_t *data_size); void ubox_assets_free(); #endif /* _UBOX_ASSETS_H */ diff --git a/src/assets.c b/src/assets.c index cfeeb20..8c14a49 100644 --- a/src/assets.c +++ b/src/assets.c @@ -36,7 +36,7 @@ uint8_t ubox_assets_init(const char *dirname) return 1; } -uint8_t ubox_assets_read(const char *name, char **data, size_t *data_size) +uint8_t ubox_assets_read(const char *name, uint8_t **data, size_t *data_size) { char buff[256]; FILE *fd; @@ -50,7 +50,7 @@ uint8_t ubox_assets_read(const char *name, char **data, size_t *data_size) fseek(fd, 0, SEEK_END); *data_size = ftell(fd); - (*data) = (char *)calloc(*data_size, 1); + (*data) = (uint8_t *)calloc(*data_size, 1); if (!(*data)) goto error_close; |