aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorHerman Semenov <[email protected]>2022-09-23 18:21:16 +0000
committerGitHub <[email protected]>2022-09-23 11:21:16 -0700
commitcb679f9e89650dee3a26f285c8d3a4d32494af6e (patch)
tree1c13f1e42f6e694e2886b073e071e2db376a2ce2 /common
parentb5d35008ed645857e46745e7b1744644fa4ea83e (diff)
Fixed bug and possible overflow type (#771)
Diffstat (limited to 'common')
-rw-r--r--common/win_main_utf8.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/win_main_utf8.h b/common/win_main_utf8.h
index e40c2158..2f83560b 100644
--- a/common/win_main_utf8.h
+++ b/common/win_main_utf8.h
@@ -47,7 +47,7 @@ static FILE *my_fopen(const char *fname, const char *mode)
auto strbuf = std::make_unique<wchar_t[]>(static_cast<size_t>(namelen+modelen));
wname = strbuf.get();
#else
- wname = (wchar_t*)calloc(sizeof(wchar_t), (size_t)(namelen+modelen));
+ wname = (wchar_t*)calloc(sizeof(wchar_t), (size_t)namelen + modelen);
#endif
wmode = wname + namelen;
MultiByteToWideChar(CP_UTF8, 0, fname, -1, wname, namelen);