From ce8dae8da7387b070873eec75a1432acef46c0f3 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 20 Jul 2024 21:21:27 +0200 Subject: [PATCH] core: use uint32_t for enum types to avoid various ub --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index bc52b25..a9d9f81 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -110,7 +110,7 @@ std::string WPTypeToCType(const SRequestArgument& arg, bool event /* events pass if (!arg.enumName.empty()) for (auto& e : XMLDATA.enums) { if (e.nameOriginal == arg.enumName) - return e.name; + return std::format("uint32_t /* {} */", e.name); } // iface