diff options
author | Leon Bottou <leon@bottou.org> | 2013-08-26 17:39:46 +0400 |
---|---|---|
committer | Leon Bottou <leon@bottou.org> | 2013-08-26 22:11:29 +0400 |
commit | 2b5199985342fd67ba1d4b546c79295cf4fd0b24 (patch) | |
tree | 6e383ee98c015981723e9812c12a0678d9211ca9 | |
parent | e001b093a47a737dc6c0b0526186918e7e8049c3 (diff) |
fixed lua_uname() code for windows
-rw-r--r-- | paths.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -810,9 +810,9 @@ static int lua_uname(lua_State *L) lua_pushliteral(L, "Windows"); name = getenv("COMPUTERNAME"); lua_pushstring(L, name ? name : ""); - if (!GetSystemInfo(&info)) - lua_pushliteral(L, ""); - else if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + memset(&info, 0, sizeof(info)); + GetSystemInfo(&info); + if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) lua_pushliteral(L, "AMD64"); else if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) lua_pushliteral(L, "X86"); |