mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/simple.rs')
| -rw-r--r-- | src/block/simple.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/block/simple.rs b/src/block/simple.rs index 87f631f..b45e2bf 100644 --- a/src/block/simple.rs +++ b/src/block/simple.rs @@ -64,6 +64,10 @@ impl SimpleBlock { pub const fn new(size: u8, symmetric: bool) -> Self { + if size == 0 + { + panic!("invalid size"); + } Self{size, symmetric} } } |