Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/paths.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Bottou <leon@bottou.org>2013-08-26 17:39:46 +0400
committerLeon Bottou <leon@bottou.org>2013-08-26 22:11:29 +0400
commit2b5199985342fd67ba1d4b546c79295cf4fd0b24 (patch)
tree6e383ee98c015981723e9812c12a0678d9211ca9
parente001b093a47a737dc6c0b0526186918e7e8049c3 (diff)
fixed lua_uname() code for windows
-rw-r--r--paths.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/paths.c b/paths.c
index 6fefe9c..6af5f47 100644
--- a/paths.c
+++ b/paths.c
@@ -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");