Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sheet Ore: Eliminate crash caused by PcgRandom range max < min #3762

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@paramat
Copy link
Member

commented Feb 21, 2016

In the calculation of y_start,
when 'column height max' was large it caused
nmin.Y + max_height > nmax.Y - max_height
Now, in this situation y_start is set to the
midpoint between nmin.Y and nmax.Y

Limit y0 and y1 to between nmin.Y and nmax.Y,
otherwise index calculation, which has no checks for limits,
places them at unwanted locations in the voxelmanip
//////////////////////////
Fix for #3743 see discussion there.

@paramat paramat added the @ Mapgen label Feb 21, 2016

@paramat paramat referenced this pull request Feb 21, 2016

Closed

Crash in sheet oregen #3743

@est31

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2016

looks good.

Sheet Ore: Eliminate crash caused by PcgRandom range max < min
In the calculation of y_start,
when 'column height max' was large it caused
nmin.Y + max_height > nmax.Y - max_height
Now, in this situation y_start is set to the
midpoint between nmin.Y and nmax.Y

Limit y0 and y1 to between nmin.Y and nmax.Y,
otherwise index calculation, which has no checks for limits,
places them at unwanted locations in the voxelmanip

@paramat paramat force-pushed the paramat:fixsheetore branch to b5ce147 Feb 21, 2016

@paramat

This comment has been minimized.

Copy link
Member Author

commented Feb 21, 2016

Testing showed ore at weird locations, updated to fix this, it was due to index calculation not checking limits.
Tested with extreme values, column height min and max = 160, this can now create continuous super-thick seams if needed.

@0-afflatus

This comment has been minimized.

Copy link

commented Feb 21, 2016

👍 tested with original values that produced crash.

@ShadowNinja ShadowNinja added the Bug label Feb 23, 2016

@paramat

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2016

Will merge soon.

@paramat

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2016

@paramat paramat closed this Feb 23, 2016

@paramat paramat deleted the paramat:fixsheetore branch Feb 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.