mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 13:52:19 +00:00
Ensure we don't subtract with underflow getting enum names (#5246)
* Ensure we don't subtract with underflow getting enum names * Yep - forgot to run this
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
249f3b3714
commit
c329d6fa90
@@ -84,8 +84,8 @@ const ENUM_NAMES_ENUM_IN_NESTED_NS:[&'static str; 3] = [
|
||||
];
|
||||
|
||||
pub fn enum_name_enum_in_nested_ns(e: EnumInNestedNS) -> &'static str {
|
||||
let index: usize = e as usize;
|
||||
ENUM_NAMES_ENUM_IN_NESTED_NS[index]
|
||||
let index = e as i8;
|
||||
ENUM_NAMES_ENUM_IN_NESTED_NS[index as usize]
|
||||
}
|
||||
|
||||
// struct StructInNestedNS, aligned to 4
|
||||
|
||||
Reference in New Issue
Block a user