From bb48704bd65ccdb438919a50848107d8c9542168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Mon, 10 May 2021 11:40:56 +0200 Subject: [PATCH] entity_view warn fixes --- .gitignore | 1 + code/common/entity_view.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 703f3f5..95f2e5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build build.bat run.bat +clean.bat work .vscode .ds_store diff --git a/code/common/entity_view.c b/code/common/entity_view.c index c710da0..172e7d3 100644 --- a/code/common/entity_view.c +++ b/code/common/entity_view.c @@ -15,14 +15,14 @@ pkt_desc pkt_entity_view_desc[] = { size_t entity_view_pack_struct(void *data, size_t len, entity_view view) { cw_pack_context pc = {0}; - cw_pack_context_init(&pc, data, len, 0); + cw_pack_context_init(&pc, data, (unsigned long)len, 0); pkt_pack_struct(&pc, pkt_entity_view_desc, PKT_STRUCT_PTR(&view)); return pc.current - pc.start; } entity_view entity_view_unpack_struct(void *data, size_t len) { cw_unpack_context uc = {0}; - cw_unpack_context_init(&uc, data, len, 0); + cw_unpack_context_init(&uc, data, (unsigned long)len, 0); entity_view view = {0}; pkt_unpack_struct(&uc, pkt_entity_view_desc, PKT_STRUCT_PTR(&view));