From acef4ff244bb3b7af596d657e2f549e33c1daf43 Mon Sep 17 00:00:00 2001 From: seyko Date: Thu, 26 Mar 2015 07:47:45 +0300 Subject: make a bound checking more compatible with Windows 64 On Linux 32: sizeof(long)=32 == sizeof(void *)=32 on Linux 64: sizeof(long)=64 == sizeof(void *)=64 on Windows 64: sizeof(long)=32 != sizeof(void *)=64 --- libtcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 5a9681f..1877bcc 100644 --- a/libtcc.c +++ b/libtcc.c @@ -388,9 +388,9 @@ ST_FUNC void section_realloc(Section *sec, unsigned long new_size) /* reserve at least 'size' bytes in section 'sec' from sec->data_offset. */ -ST_FUNC void *section_ptr_add(Section *sec, unsigned long size) +ST_FUNC void *section_ptr_add(Section *sec, size_t size) { - unsigned long offset, offset1; + size_t offset, offset1; offset = sec->data_offset; offset1 = offset + size; -- cgit v1.3.1