Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is this a compiler bug?

Author: Angrim

Date: 10:13:20 10/25/03

Go up one level in this thread


On October 25, 2003 at 09:49:58, Tord Romstad wrote:


>void uci_wait_for_command() {
>  char command[10000];
>
>  fgets(command, 10000, stdin);
>  uci_handle_command(command); }
>
>It is the call to fgets which causes the crash.  The reason why the problem

I don't see a problem with this code right off, so
to speed debugging, I'd suggest trying this

void uci_wait_for_command() {
  char command[10000];

  memset(command, 'X', 10000);
  fgets(command, 10000, stdin);
  uci_handle_command(command); }

Good luck,
Angrim



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.