Skip to content
Snippets Groups Projects
Commit 6f6422b0 authored by deuce's avatar deuce
Browse files

Open with sharable=false because if any user has the file open, their turn

isn't done.  Regardless of if the open fails (Win32) or succeeds (*nix),
we know enough that we can say the poll is unsuccessful.
parent a68c70f6
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ function main(argc, argv)
fp = new File(game_dir+'/'+filename);
turn_done = false;
if(fp.open("rb")) {
if(fp.open("rb", true)) {
for(i = 0; (inbuf = fp.readln()) != null; i++) {
if(inbuf.search(/^end-turn\s*$/)==0) {
turn_done = true;
......@@ -88,6 +88,8 @@ function main(argc, argv)
}
fp.close();
}
else
break;
if(turn_done)
done_count++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment