diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-05-22 23:23:55 +0200 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2024-05-22 23:23:55 +0200 |
commit | c08ea611759407b0e0c8dbea384c4f5273d27d3f (patch) | |
tree | 44b52dcca88bbbc4c92efc0f187adb7332637dcb | |
parent | 34e1632092d1a9695b539d0244ce948194ed76c9 (diff) | |
download | luasystem-c08ea611759407b0e0c8dbea384c4f5273d27d3f.zip |
fix
-rw-r--r-- | src/term.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -656,6 +656,12 @@ static int lst_setnonblock(lua_State *L) return pusherror(L, "Error changing O_NONBLOCK: "); } +#else + HANDLE console_handle = get_console_handle(L, 1); + if (console_handle == NULL) { + return 2; // error message is already on the stack + } + #endif lua_pushboolean(L, 1); @@ -691,6 +697,11 @@ static int lst_getnonblock(lua_State *L) } #else + HANDLE console_handle = get_console_handle(L, 1); + if (console_handle == NULL) { + return 2; // error message is already on the stack + } + lua_pushboolean(L, 0); #endif |