From 03fc3ec80351c4edef43fb2a34ce96e2a3d1562e Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 4 Apr 2021 22:51:21 +0200 Subject: [PATCH] Do not allow write variant of string as local variable To be consitent with read where it's not allowed. --- components/esm/variantimp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/esm/variantimp.cpp b/components/esm/variantimp.cpp index aeea5017e..2b69923d1 100644 --- a/components/esm/variantimp.cpp +++ b/components/esm/variantimp.cpp @@ -98,6 +98,9 @@ void ESM::VariantStringData::write (ESMWriter& esm, Variant::Format format, VarT if (format==Variant::Format_Info) throw std::runtime_error ("info variables of type string not supported"); + if (format==Variant::Format_Local) + throw std::runtime_error ("local variables of type string not supported"); + // GMST esm.writeHNString ("STRV", mValue); }