Browse Source

64-bit fix (reported by Alex Wulms)

Rusty Russell 17 years ago
parent
commit
4df5a75fd9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/crcsync/crcsync.c

+ 1 - 1
ccan/crcsync/crcsync.c

@@ -268,7 +268,7 @@ long crc_read_flush(struct crc_context *ctx)
 	}
 
 	/* We matched (some of) what's left. */
-	ret = -(ctx->num_crcs-1)-1;
+	ret = -((int)ctx->num_crcs-1)-1;
 	ctx->buffer_start += final;
 	ctx->literal_bytes -= final;
 	return ret;