diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-23 15:57:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-23 15:57:30 +0000 |
commit | 681dc046ef9c9681b48ae1584fb82343757b6bfc (patch) | |
tree | 4cb34c82fc5e36caf047235a579df166756999a3 /src | |
parent | 196b1b09d32130c1806108904ded406844fd90e0 (diff) |
In the constructor which doesnt set Request::id, we set Request::id explicitly to '\0', which will prevent such a request accidentally breaking an id-supporting module with an uninitialized buffer :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4533 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 13cc3e740..25062cd47 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -79,11 +79,15 @@ Admin::Admin(std::string name, std::string email, std::string nick) Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { + /* Ensure that because this module doesnt support ID strings, it doesnt break modules that do + * by passing them uninitialized pointers (could happen) + */ + id = '\0'; } Request::Request(Module* src, Module* dst, const char* idstr) : id(idstr), source(src), dest(dst) -{ +{ }; char* Request::GetData() |