mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
fix min color width to 1 (prevent div by 0)
This commit is contained in:
parent
c31ae245b1
commit
1855b2cfa7
@ -904,7 +904,7 @@ namespace netgen
|
||||
data.Append(cf);
|
||||
}
|
||||
int n = data.Size()/4;
|
||||
colors.width = min2(n, 1024);
|
||||
colors.width = max2(1,min2(n, 1024));
|
||||
colors.height = (n+colors.width-1)/colors.width;
|
||||
for([[maybe_unused]] auto i: Range(n, colors.width*colors.height))
|
||||
data.Append({0.0f, 0.0f, 0.0f, 0.0f});
|
||||
|
Loading…
Reference in New Issue
Block a user