Make sure that the inc_recurse value is always set to

either 0 or 1.
This commit is contained in:
Wayne Davison committed 2007-11-29 22:46:43 -08:00
1 parent 87531e6302
commit 87de82f2d0
1 file changed
+3 -2
+3 -2
View File
@@ -231,11 +231,12 @@ void setup_protocol(int f_out,int f_in)
exit_cleanup(RERR_PROTOCOL);
}
} else if (protocol_version >= 30) {
/* The inc_recurse var MUST be set to 0 or 1. */
if (am_server) {
inc_recurse = allow_inc_recurse;
inc_recurse = allow_inc_recurse ? 1 : 0;
write_byte(f_out, inc_recurse);
} else
inc_recurse = read_byte(f_in);
inc_recurse = read_byte(f_in) ? 1 : 0;
if (inc_recurse && !allow_inc_recurse) {
/* This should only be able to happen in a batch. */
fprintf(stderr,