Update dosbox shim to work with unpatched dosbox
This commit is contained in:
parent
edb1b41652
commit
1cc8e16b71
@ -25,7 +25,7 @@ int main(int argc, char **argv) {
|
||||
char inbuf[256];
|
||||
int i;
|
||||
char *arguments[4];
|
||||
|
||||
char last_char = 255;
|
||||
if (argc < 4) {
|
||||
fprintf(stderr, "Usage ./dosbox_shim [port] [node] [script]\n");
|
||||
exit(-1);
|
||||
@ -97,6 +97,12 @@ int main(int argc, char **argv) {
|
||||
if (FD_ISSET(STDIN_FILENO, &read_fds)) {
|
||||
len = read(STDIN_FILENO, inbuf, 256);
|
||||
for (i=0;i<len;i++) {
|
||||
if (last_char == '\r' && inbuf[i] == '\n') {
|
||||
continue;
|
||||
}
|
||||
|
||||
last_char = inbuf[i];
|
||||
|
||||
write(client_fd, &inbuf[i], 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user