diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-15 14:41:47 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-02-04 14:03:13 +0100 |
commit | d608a30d576ed74f7dc7374c1f00d2303fee27f6 (patch) | |
tree | a6637dee5800ee1f9af6331d3df02d84afe45d9a /win/rfb_win32/ModuleFileName.h | |
parent | ef8c84eb752e1b59ef824cedeb156b2d64fefe37 (diff) | |
download | tigervnc-d608a30d576ed74f7dc7374c1f00d2303fee27f6.tar.gz tigervnc-d608a30d576ed74f7dc7374c1f00d2303fee27f6.zip |
Use fixed size character buffer
We know the needed space here, so let's keep it simple with a constant
size string buffer.
Diffstat (limited to 'win/rfb_win32/ModuleFileName.h')
-rw-r--r-- | win/rfb_win32/ModuleFileName.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/win/rfb_win32/ModuleFileName.h b/win/rfb_win32/ModuleFileName.h index 02a34f1a..9a06f50d 100644 --- a/win/rfb_win32/ModuleFileName.h +++ b/win/rfb_win32/ModuleFileName.h @@ -21,18 +21,17 @@ #include <windows.h> -#include <rfb/util.h> - namespace rfb { namespace win32 { - struct ModuleFileName : public CharArray { - ModuleFileName(HMODULE module=0) : CharArray(MAX_PATH) { + struct ModuleFileName { + ModuleFileName(HMODULE module=0) { if (!module) module = GetModuleHandle(0); if (!GetModuleFileName(module, buf, MAX_PATH)) buf[0] = 0; } + char buf[MAX_PATH]; }; }; |