From: Dale Weiler Date: Mon, 25 Nov 2013 07:11:45 +0000 (-0500) Subject: Fix CRC16 X-Git-Tag: xonotic-v0.8.0~61 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8a26ed7664cccb29ca4552321137ba9a1d3ba7f0;p=xonotic%2Fgmqcc.git Fix CRC16 --- diff --git a/intrin.c b/intrin.c index a6d3520..c9cbfed 100644 --- a/intrin.c +++ b/intrin.c @@ -860,6 +860,7 @@ static ast_expression *intrin_pow(intrin_t *intrin) { (ast_expression*)intrin->fold->imm_float[1] ) ); + vec_push(body->exprs, (ast_expression*)ast_store_new( intrin_ctx(intrin), @@ -868,6 +869,7 @@ static ast_expression *intrin_pow(intrin_t *intrin) { (ast_expression*)callsqrt1 ) ); + vec_push(body->exprs, (ast_expression*)ast_store_new( intrin_ctx(intrin), diff --git a/util.c b/util.c index 4300d3c..e9d4cfe 100644 --- a/util.c +++ b/util.c @@ -482,6 +482,7 @@ uint16_t util_crc16(uint16_t current, const char *GMQCC_RESTRICT k, size_t len) SELECT_DATA(1) ^ SELECT_DATA(0); data += 8; + len -= 8; } #undef SELECT_BULK