aboutsummaryrefslogtreecommitdiff
path: root/src/stable_vec.rs
diff options
context:
space:
mode:
authorArne Dußin2021-02-03 16:26:59 +0100
committerArne Dußin2021-02-03 16:26:59 +0100
commit9ab689527b3ede7750579b1a926cf0cf88813463 (patch)
tree959894450512ebb10e86ed62058da1d7039614ef /src/stable_vec.rs
parentd4c1c7ecb5688ef64f45425d9ac8e7ddeb8e8602 (diff)
downloadgraf_karto-9ab689527b3ede7750579b1a926cf0cf88813463.tar.gz
graf_karto-9ab689527b3ede7750579b1a926cf0cf88813463.zip
Add capability to draw rooms
Diffstat (limited to 'src/stable_vec.rs')
-rw-r--r--src/stable_vec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stable_vec.rs b/src/stable_vec.rs
index c3b8685..4d25e0e 100644
--- a/src/stable_vec.rs
+++ b/src/stable_vec.rs
@@ -55,7 +55,7 @@ impl<T> StableVec<T> {
if self.data.is_empty() {
0
} else if self.data.last().unwrap().0 < usize::MAX {
- self.data.last().unwrap().0
+ self.data.last().unwrap().0 + 1
} else {
// Try to find a position in the vector that is still free, starting at the bottom.
let mut prev_id = self.data.first().unwrap().0;