summaryrefslogtreecommitdiff
path: root/lib/wx
diff options
context:
space:
mode:
authorDan Gudmundsson <dgud@erlang.org>2020-10-28 12:55:35 +0100
committerGitHub <noreply@github.com>2020-10-28 12:55:35 +0100
commit7a31642a9e86990415085b9628e5b6583500b865 (patch)
tree6389ccc792779ba4e571cf4c83c0514e0eb09f53 /lib/wx
parente06db83c0402a1ee3679a96a52f42194a8b6704c (diff)
parenta063e36b6166a5716c332fcd66f0f41c7655b83d (diff)
downloaderlang-7a31642a9e86990415085b9628e5b6583500b865.tar.gz
Merge pull request #2810 from diodechain/fix_large_environment_var
Fixed using unitialized variable when environment var is too big (add a ticket here because I forgot in the previous PR, need the release note) OTP-16983
Diffstat (limited to 'lib/wx')
-rw-r--r--lib/wx/c_src/wxe_ps_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/wx/c_src/wxe_ps_init.c b/lib/wx/c_src/wxe_ps_init.c
index 62c7c51c13..d82d142967 100644
--- a/lib/wx/c_src/wxe_ps_init.c
+++ b/lib/wx/c_src/wxe_ps_init.c
@@ -74,7 +74,7 @@ void * wxe_ps_init2() {
if( !is_packaged_app() ) {
// Undocumented function (but no documented way of doing this exists)
int res = erl_drv_getenv("WX_APP_TITLE", app_title_buf, &app_len);
- if (res >= 0) {
+ if (res == 0) {
app_title = app_title_buf;
} else {
app_title = NULL;