aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/loadsofa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/makemhr/loadsofa.cpp')
-rw-r--r--utils/makemhr/loadsofa.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/utils/makemhr/loadsofa.cpp b/utils/makemhr/loadsofa.cpp
index 49d16556..c91613c8 100644
--- a/utils/makemhr/loadsofa.cpp
+++ b/utils/makemhr/loadsofa.cpp
@@ -149,9 +149,17 @@ static double GetUniformStepSize(const double epsilon, const uint m, const doubl
count = 1;
if(counts[0] > m/2)
- return steps[0];
+ break;
}
+ if(counts[0] > 255)
+ {
+ uint i{2u};
+ while(counts[0]/i > 255 && (counts[0]%i) != 0)
+ ++i;
+ counts[0] /= i;
+ steps[0] *= i;
+ }
if(counts[0] > 5)
return steps[0];
return 0.0;