Bug fix for os_getpass on Windows

Verified as working with Visual Studio 2015.
This commit is contained in:
Matthew Versluys 2016-05-15 11:27:02 -07:00
parent d5e53a0be0
commit 4d352ff01b

View File

@ -27,7 +27,7 @@ int os_getpass(lua_State* L)
WriteConsoleA(hstdout, newline, strlen(newline), &written_chars, NULL);
StrTrimA(buffer, "\r\n");
buffer[strcspn(buffer, "\r\n")] = '\0';
lua_pushstring(L, buffer);
return 1;