Closed rempas closed 2 years ago
Aside from the bug, some comments about the code:
This line is incorrect, because it casts the value of '0'
into the pointer, so you will get the pointer with the value of 0x30.
return cast(u8*)'0';
This one is correct and returns pointer to the global memory
return "0";
Also, for int printing I use static buffers https://github.com/MrSmith33/voxelman2/blob/master/plugins/core/src/core/utils.vx#L355-L436
Man you are a genius I'm not joking!!!
I'm having a function that takes an
i32
and return anu8
. I will list the code that produces the error. Keep attention to the comment:Also it is worth noted that this function compiled normally in a previous commit but it doesn't in the latest CI build.