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 /src | |
| parent | 34e1632092d1a9695b539d0244ce948194ed76c9 (diff) | |
| download | luasystem-c08ea611759407b0e0c8dbea384c4f5273d27d3f.tar.gz luasystem-c08ea611759407b0e0c8dbea384c4f5273d27d3f.tar.bz2 luasystem-c08ea611759407b0e0c8dbea384c4f5273d27d3f.zip | |
fix
Diffstat (limited to 'src')
| -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) | |||
| 656 | return pusherror(L, "Error changing O_NONBLOCK: "); | 656 | return pusherror(L, "Error changing O_NONBLOCK: "); |
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | #else | ||
| 660 | HANDLE console_handle = get_console_handle(L, 1); | ||
| 661 | if (console_handle == NULL) { | ||
| 662 | return 2; // error message is already on the stack | ||
| 663 | } | ||
| 664 | |||
| 659 | #endif | 665 | #endif |
| 660 | 666 | ||
| 661 | lua_pushboolean(L, 1); | 667 | lua_pushboolean(L, 1); |
| @@ -691,6 +697,11 @@ static int lst_getnonblock(lua_State *L) | |||
| 691 | } | 697 | } |
| 692 | 698 | ||
| 693 | #else | 699 | #else |
| 700 | HANDLE console_handle = get_console_handle(L, 1); | ||
| 701 | if (console_handle == NULL) { | ||
| 702 | return 2; // error message is already on the stack | ||
| 703 | } | ||
| 704 | |||
| 694 | lua_pushboolean(L, 0); | 705 | lua_pushboolean(L, 0); |
| 695 | 706 | ||
| 696 | #endif | 707 | #endif |
