From 18fcd99e4fd59c2cda6fbc57eca80a4b6b8522bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Tue, 18 Jun 2024 19:35:08 +0500 Subject: [PATCH] Windows compatibility --- native/fopen.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/native/fopen.c b/native/fopen.c index 73b4054..a58a6a2 100644 --- a/native/fopen.c +++ b/native/fopen.c @@ -11,10 +11,9 @@ void labashka(unsigned short (*pop)(void), void (*push)(unsigned short), size_t char *filename = calloc(filenamelen, sizeof(char)); for (short i = filenamelen - 1; i != -1; i--) filename[i] = pop(); - FILE *file = fopen(filename, mode); - push((short)((0xFFFF000000000000 & (long)file) >> (16*3) )); - push((short)((0x0000FFFF00000000 & (long)file) >> (16*2) )); - push((short)((0x00000000FFFF0000 & (long)file) >> (16*1) )); - push((short)((0x000000000000FFFF & (long)file) >> (16*0) )); + push((short)((0xFFFF000000000000 & (size_t)file) >> (16*3) )); + push((short)((0x0000FFFF00000000 & (size_t)file) >> (16*2) )); + push((short)((0x00000000FFFF0000 & (size_t)file) >> (16*1) )); + push((short)((0x000000000000FFFF & (size_t)file) >> (16*0) )); }