Fix silly execve() regression

This commit is contained in:
Justine Tunney 2023-10-04 08:07:07 -07:00
parent 4631d34d0d
commit af8236264e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 5 additions and 3 deletions

View file

@ -501,6 +501,8 @@ textwindows int FlushConsoleInputBytes(int64_t handle) {
if (FlushConsoleInputBuffer(handle)) {
dll_make_first(&__keystroke.free, __keystroke.list);
__keystroke.list = 0;
dll_make_first(&__keystroke.free, __keystroke.line);
__keystroke.line = 0;
rc = 0;
} else {
rc = __winerr();

View file

@ -22,7 +22,6 @@
#include "libc/calls/blocksigs.internal.h"
#include "libc/calls/calls.h"
#include "libc/calls/cp.internal.h"
#include "libc/proc/execve.internal.h"
#include "libc/calls/syscall-sysv.internal.h"
#include "libc/cosmo.h"
#include "libc/dce.h"
@ -35,6 +34,7 @@
#include "libc/limits.h"
#include "libc/mem/alloca.h"
#include "libc/paths.h"
#include "libc/proc/execve.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/runtime/stack.h"
#include "libc/str/str.h"
@ -53,8 +53,8 @@ static struct {
const char *tmpdir;
} g_execve;
static bool IsApeFile(const char *path) {
if (!endswith(path, ".com")) {
bool IsApeFile(const char *path) {
if (endswith(path, ".com")) {
return true;
} else {
bool res = false;