From 2f0e0dd995762dda2d8d8ab8ac1ca229c275e7a7 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 11 Jan 2019 13:45:10 +0100 Subject: [PATCH] Really fix emit_small_memcpy this time! --- lib/frontend/src/frontend.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index 8867f9ad69..06fbbecec5 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -612,7 +612,7 @@ impl<'a> FunctionBuilder<'a> { "`size` is smaller than `dest` and `src`'s alignment value." ); - let (access_size, int_type) = if access_size > 8 { + let (access_size, int_type) = if access_size <= 8 { (access_size, Type::int((access_size * 8) as u16).unwrap()) } else { (8, types::I64) @@ -693,7 +693,7 @@ impl<'a> FunctionBuilder<'a> { "`size` is smaller than `dest` and `src`'s alignment value." ); - let (access_size, int_type) = if access_size > 8 { + let (access_size, int_type) = if access_size <= 8 { (access_size, Type::int((access_size * 8) as u16).unwrap()) } else { (8, types::I64)