From 29f2bd27c44ef51f8af1299cf16012a4fa89cc61 Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Sun, 16 May 2021 11:58:44 +0200 Subject: Codechange: [Game] Pass the length instead of '\0' terminating (and undoing that) in the middle of a C-string --- src/script/api/script_event_types.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/script/api/script_event_types.hpp') diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp index 1d514389b..b6ed7bfbc 100644 --- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -860,21 +860,21 @@ private: * @param vm The VM used. * @param p The (part of the) JSON string reading. */ - char *ReadTable(HSQUIRRELVM vm, char *p); + const char *ReadTable(HSQUIRRELVM vm, const char *p); /** * Read a value from a JSON string. * @param vm The VM used. * @param p The (part of the) JSON string reading. */ - char *ReadValue(HSQUIRRELVM vm, char *p); + const char *ReadValue(HSQUIRRELVM vm, const char *p); /** * Read a string from a JSON string. * @param vm The VM used. * @param p The (part of the) JSON string reading. */ - char *ReadString(HSQUIRRELVM vm, char *p); + const char *ReadString(HSQUIRRELVM vm, const char *p); }; /** -- cgit v1.2.3-54-g00ecf