diff options
author | Adam <Adam@anope.org> | 2014-05-27 12:53:20 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-05-27 12:55:03 -0400 |
commit | e8ad509aa5b4bed4f61f32fd1ac7bfeb49685be5 (patch) | |
tree | be2210f4cf08d573f0adab9230156ab56697a5cd /src/win32 | |
parent | 37b3ed8ef39bb0e3e4f730f354a646b4cdc36e8e (diff) |
Fix dlerror() on Windows and do not abort if err is not set
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/dl/dl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/win32/dl/dl.cpp b/src/win32/dl/dl.cpp index b7ffddaa3..5b19d7441 100644 --- a/src/win32/dl/dl.cpp +++ b/src/win32/dl/dl.cpp @@ -15,7 +15,8 @@ void *dlopen(const char *filename, int) char *dlerror(void) { - static Anope::string err = Anope::LastError(); + static Anope::string err; + err = Anope::LastError(); SetLastError(0); return err.empty() ? NULL : const_cast<char *>(err.c_str()); } |