From aba948722fdf70996229109b15d97bfee0549aa6 Mon Sep 17 00:00:00 2001 From: MALASHKIN Andrei Date: Mon, 12 Feb 2024 15:39:20 +0100 Subject: [PATCH] forbid quering of chars --- src/JSONVar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/JSONVar.h b/src/JSONVar.h index 47606c4..44fe20e 100644 --- a/src/JSONVar.h +++ b/src/JSONVar.h @@ -89,7 +89,9 @@ class JSONVar : public Printable { JSONVar operator[](const String& key); JSONVar operator[](int index); JSONVar operator[](const JSONVar& key); - +#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) + JSONVar operator[](const char) = delete; +#endif int length() const; JSONVar keys() const; bool hasOwnProperty(const char* key) const;