]> git.lizzy.rs Git - rust.git/commitdiff
Update src/fn_call.rs
authorbjorn3 <bjorn3@users.noreply.github.com>
Mon, 8 Apr 2019 08:44:02 +0000 (10:44 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2019 08:44:02 +0000 (10:44 +0200)
Co-Authored-By: TimDiekmann <21277928+TimDiekmann@users.noreply.github.com>
src/fn_call.rs

index 2db23bd48c541144d4fcd8b1b5cfcf29cdbfa7ee..83eb37708e8e434d7d0bcdde73376c0ef5da57b4 100644 (file)
@@ -98,7 +98,7 @@ fn emulate_foreign_item(
                 let len = this.read_scalar(args[1])?.to_usize(this)?;
                 let bytes = items.checked_mul(len).ok_or_else(|| InterpError::Overflow(mir::BinOp::Mul))?;
 
-                if bytes== 0 {
+                if bytes == 0 {
                     this.write_null(dest)?;
                 } else {
                     let size = Size::from_bytes(bytes);