diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-16 11:58:44 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-30 10:15:22 +0200 |
commit | 29f2bd27c44ef51f8af1299cf16012a4fa89cc61 (patch) | |
tree | 71696926717dacf9db2ee80273ac8d11a1b93b8e /src/script/api/script_event_types.hpp | |
parent | 8a918ce1709cb80191ba8e5195ec8ef02d484d9e (diff) | |
download | openttd-29f2bd27c44ef51f8af1299cf16012a4fa89cc61.tar.xz |
Codechange: [Game] Pass the length instead of '\0' terminating (and undoing that) in the middle of a C-string
Diffstat (limited to 'src/script/api/script_event_types.hpp')
-rw-r--r-- | src/script/api/script_event_types.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); }; /** |