From 5e7ed2f6534bf8d99688e375c56f44f792bdf7bb Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 6 Dec 2025 02:29:57 +0100 Subject: Fluid: fix class prefix user input check. --- fluid/nodes/Function_Node.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'fluid/nodes/Function_Node.h') diff --git a/fluid/nodes/Function_Node.h b/fluid/nodes/Function_Node.h index 56a0046e0..282f33312 100644 --- a/fluid/nodes/Function_Node.h +++ b/fluid/nodes/Function_Node.h @@ -34,6 +34,8 @@ #include #include +#include + extern class Class_Node *current_class; int has_toplevel_function(const char *rtype, const char *sig); @@ -271,7 +273,7 @@ public: private: const char* subclass_of; char public_; - const char* class_prefix; + std::string prefix_; public: Class_Node(); ~Class_Node(); @@ -298,8 +300,10 @@ public: void visibility(char v) { public_ = v; } // class prefix attribute access - void prefix(const char* p); - const char* prefix() const {return class_prefix;} + /** Set the text between `class` and the class name */ + void prefix(const std::string& p) { prefix_ = p; } + /** Get the text between `class` and the class name */ + std::string prefix() const { return prefix_; } }; #endif // FLUID_NODES_FUNCTION_NODE_H -- cgit v1.2.3