Skip to content

Commit 7b2f728

Browse files
authored
Merge pull request #61 from rylev/float-encoding-bug
Fix mistaken encoding of f32
2 parents dec89a4 + c6a74bf commit 7b2f728

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/wac-parser/src/resolution/encoding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl From<PrimitiveType> for PrimitiveValType {
377377
PrimitiveType::S32 => Self::S32,
378378
PrimitiveType::U64 => Self::U64,
379379
PrimitiveType::S64 => Self::S64,
380-
PrimitiveType::Float32 => Self::Float64,
380+
PrimitiveType::Float32 => Self::Float32,
381381
PrimitiveType::Float64 => Self::Float64,
382382
PrimitiveType::Char => Self::Char,
383383
PrimitiveType::Bool => Self::Bool,

crates/wac-parser/tests/encoding/types.wat.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(export (;13;) "g" (type 12))
1616
(type (;14;) s64)
1717
(export (;15;) "h" (type 14))
18-
(type (;16;) float64)
18+
(type (;16;) float32)
1919
(export (;17;) "i" (type 16))
2020
(type (;18;) float64)
2121
(export (;19;) "j" (type 18))

0 commit comments

Comments
 (0)