Skip to content

Commit

Permalink
fix: fixed input buffer bug
Browse files Browse the repository at this point in the history
- fixed input bug where inputs were only processed on integrated terminals
  • Loading branch information
ArjunBasandrai committed Oct 21, 2023
1 parent 7ee1753 commit 248bde7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Binary file modified shuffle.exe
Binary file not shown.
9 changes: 1 addition & 8 deletions src/uci.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,11 @@ void parse_go(char *command)
void uci_loop() {
int max_hash = 1024;
int mb = 64;
// clear STDIN & STDOUT buffers
setbuf(stdin, NULL);

setbuf(stdout, NULL);

char input[2000];

// printf("id name %s %s\n",engine_name,version);
// printf("id author Arjun Basandrai\n");
// printf("option name Hash type spin default 64 min 4 max %d\n",max_hash);
// printf("uciok\n");

// main loop
while (1) {
memset(input, 0, sizeof(input));
Expand Down Expand Up @@ -278,7 +272,6 @@ void uci_loop() {
if (mb < 4) mb = 4;
if (mb > max_hash) mb = max_hash;

// printf("Set hash table size to %dMB\n", mb);
init_transposition_table(mb);
}
}
Expand Down

0 comments on commit 248bde7

Please sign in to comment.