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) )); }