mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-02 23:18:44 +00:00
Fix regression in kilo example
This commit is contained in:
parent
96bdd7e90f
commit
c4d8f40422
2 changed files with 6 additions and 2 deletions
|
@ -93,7 +93,8 @@ o/$(MODE)/examples/examples.pkg: \
|
|||
|
||||
o/$(MODE)/examples/unbourne.o: \
|
||||
OVERRIDE_CPPFLAGS += \
|
||||
-DSTACK_FRAME_UNLIMITED
|
||||
-DSTACK_FRAME_UNLIMITED \
|
||||
-fpie
|
||||
|
||||
o/$(MODE)/examples/%.com.dbg: \
|
||||
$(EXAMPLES_DEPS) \
|
||||
|
|
|
@ -249,7 +249,10 @@ fatal:
|
|||
int editorReadKey(int64_t fd) {
|
||||
int nread;
|
||||
char c, seq[3];
|
||||
if ((nread = read(fd, &c, 1)) == -1) exit(1);
|
||||
do {
|
||||
nread = read(fd, &c, 1);
|
||||
if (nread == -1) exit(1);
|
||||
} while (!nread);
|
||||
|
||||
while (1) {
|
||||
switch (c) {
|
||||
|
|
Loading…
Add table
Reference in a new issue