From 88b819628fc865edc412b2a0bb0a56274be8c694 Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Fri, 16 Nov 2018 20:13:53 +0100 Subject: [PATCH] fix splitTokens --- src/de/inetsoftware/jwebassembly/watparser/WatParser.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/de/inetsoftware/jwebassembly/watparser/WatParser.java b/src/de/inetsoftware/jwebassembly/watparser/WatParser.java index 99f5a1d..6da894b 100644 --- a/src/de/inetsoftware/jwebassembly/watparser/WatParser.java +++ b/src/de/inetsoftware/jwebassembly/watparser/WatParser.java @@ -70,6 +70,9 @@ public class WatParser extends WasmCodeBuilder { case "i32.add": addNumericInstruction( NumericOperator.add, ValueType.i32, javaCodePos ); break; + case "f32.max": + addNumericInstruction( NumericOperator.max, ValueType.f32, javaCodePos ); + break; case "i64.extend_s/i32": addConvertInstruction( ValueTypeConvertion.i2l, javaCodePos ); break; @@ -138,7 +141,7 @@ public class WatParser extends WasmCodeBuilder { case '\n': case '\r': case '\t': - if( off + 1 < i ) { + if( off < i ) { tokens.add( wat.substring( off, i ) ); } off = i + 1;