1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 10:44:07 +02:00

fix ElementCount (too many) for Vector

This commit is contained in:
Quaternions 2025-02-13 16:14:32 -08:00
commit ba08e13b46

View file

@ -103,6 +103,9 @@ impl FromStr for Vector {
let x = floats.next().ok_or(EntityParseError::ElementCount)??;
let y = floats.next().ok_or(EntityParseError::ElementCount)??;
let z = floats.next().ok_or(EntityParseError::ElementCount)??;
if floats.next().is_some() {
return Err(EntityParseError::ElementCount);
}
Ok(Vector { x, y, z })
}
}