Skip to content

Commit

Permalink
Fix a problem with type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackvoxel committed Jul 25, 2022
1 parent 51aa78b commit f891808
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/ZVoxelType_Concrete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@

ZVoxelExtension * ZVoxelType_Concrete::CreateVoxelExtension(bool IsLoadingPhase)
{
float Pressure = 0.0;
ZMemSize Ms = *((ULong *)&Pressure);
union
{
float Pressure;
ZVoxelExtension * Extension;
};

Extension = 0;
Pressure = 0.0;

return( Extension );

return( (ZVoxelExtension *)Ms);
}

void ZVoxelType_Concrete::GetBlockInformations(ZVoxelLocation * DestLocation, ZString & Infos)
Expand Down

0 comments on commit f891808

Please sign in to comment.