mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
fix infinite block fields conversion requests
This commit is contained in:
parent
147cf5b417
commit
0494db9187
1 changed files with 3 additions and 0 deletions
|
|
@ -44,6 +44,9 @@ StructLayout StructLayout::create(const std::vector<Field>& fields) {
|
||||||
}
|
}
|
||||||
std::sort(builtFields.begin(), builtFields.end(),
|
std::sort(builtFields.begin(), builtFields.end(),
|
||||||
[](const Field& a, const Field& b) {
|
[](const Field& a, const Field& b) {
|
||||||
|
if (a.size == b.size) {
|
||||||
|
return a.name < b.name;
|
||||||
|
}
|
||||||
return a.size > b.size;
|
return a.size > b.size;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue