forked from osmocom/wireshark
GetModuleFileName expects the size of the passed buffer to be expressed in TCHAR. We currently pass the size expressed in bytes. In other words, we incorrectly state that the buffer is twice as big as it really is.
svn path=/trunk/; revision=30344
This commit is contained in:
parent
14c4a8f23b
commit
94ff940129
|
@ -277,7 +277,7 @@ init_progfile_dir(const char *arg0
|
|||
* Attempt to get the full pathname of the currently running
|
||||
* program.
|
||||
*/
|
||||
if (GetModuleFileName(NULL, prog_pathname_w, sizeof prog_pathname_w) != 0) {
|
||||
if (GetModuleFileName(NULL, prog_pathname_w, G_N_ELEMENTS(prog_pathname_w)) != 0) {
|
||||
/*
|
||||
* XXX - Should we use g_utf16_to_utf8(), as in
|
||||
* getenv_utf8()?
|
||||
|
|
Loading…
Reference in New Issue