diff options
| author | ruki <[email protected]> | 2017-05-31 08:19:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-31 08:20:10 +0800 |
| commit | f4c6af603c6b8deb2821600d02409a670748efcc (patch) | |
| tree | cf061d5ca08f82918904e914f4d42c783e37e01b /core/src/xmake | |
| parent | f01d5364141a3e2a965bd9d46e65a2bd851e27ec (diff) | |
fix winreg.query malloc
Diffstat (limited to 'core/src/xmake')
| -rw-r--r-- | core/src/xmake/winreg/query.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/xmake/winreg/query.c b/core/src/xmake/winreg/query.c index 036d4a7c3..4d2732ae6 100644 --- a/core/src/xmake/winreg/query.c +++ b/core/src/xmake/winreg/query.c @@ -151,7 +151,7 @@ tb_int_t xm_winreg_query(lua_State* lua) } // make value buffer - value = (tb_char_t*)tb_malloc0(valuesize); + value = (tb_char_t*)tb_malloc0(valuesize + 1); tb_assert_and_check_break(value); // get value result @@ -183,7 +183,7 @@ tb_int_t xm_winreg_query(lua_State* lua) } // make value buffer - value = (tb_char_t*)tb_malloc0(valuesize); + value = (tb_char_t*)tb_malloc0(valuesize + 1); tb_assert_and_check_break(value); // get value result |
