From 5a4cfae182b99beb2f6ca1f4c349a7646f287bd6 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 24 Mar 2026 16:38:55 +0100 Subject: [PATCH] Warn of object name exceeds `255` characters --- lib/config/configitembuilder.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/config/configitembuilder.cpp b/lib/config/configitembuilder.cpp index 470afd303..6de6af556 100644 --- a/lib/config/configitembuilder.cpp +++ b/lib/config/configitembuilder.cpp @@ -96,6 +96,15 @@ ConfigItem::Ptr ConfigItemBuilder::Compile() << "Object name of type '" << m_Type->GetName() << "' contains leading/trailing whitespace.\n" << oss.str(); } + if (m_Name.GetLength() > 255) { + std::ostringstream oss; + ShowCodeLocation(oss, m_DebugInfo, false); + + Log(LogWarning, "config") + << "Object name of type '" << m_Type->GetName() << "' is too long (length: " << m_Name.GetLength() + << ", max: 255).\n" << oss.str(); + } + std::vector > exprs; Array::Ptr templateArray = new Array({ m_Name });