From 680d378002d74e0e41ce81946382757c266bd3b3 Mon Sep 17 00:00:00 2001 From: pythonology Date: Thu, 10 Jan 2019 23:30:54 -0500 Subject: [PATCH] pclass: EnumType::write_to should first attempt cast the value to `Enum` --- src/pclass/EnumType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pclass/EnumType.cpp b/src/pclass/EnumType.cpp index 4212346..a7bac4c 100644 --- a/src/pclass/EnumType.cpp +++ b/src/pclass/EnumType.cpp @@ -112,7 +112,7 @@ namespace pclass void EnumType::write_to(BitStream &stream, Value &value) const { // Get an Enum reference and use it to write to the stream - value.get().write_to(stream); + value.as().get().write_to(stream); } Value EnumType::read_from(BitStream &stream) const