mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-05-23 22:07:06 -05:00
Only use the pixelCount if it's valid
This fixes a crash in Unbound
This commit is contained in:
parent
0f89168e99
commit
e354ba2fc7
|
|
@ -89,7 +89,7 @@ namespace HavenSoft.HexManiac.Core.Models.Runs {
|
|||
if (height == 0) { height = width; adjustDimensions = true; }
|
||||
var tileWidth = (int)Math.Max(1, Math.Ceiling(width / 8.0));
|
||||
var tileHeight = (int)Math.Max(1, Math.Ceiling(height / 8.0));
|
||||
while (adjustDimensions) {
|
||||
while (adjustDimensions && pixelCount > 0) {
|
||||
adjustDimensions = false;
|
||||
while (tileWidth * tileHeight * 64 > pixelCount) {
|
||||
adjustDimensions = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user