提交 e954d811 编写于 作者: chai2010's avatar chai2010

Merge branch 'master' of gitee.com:wa-lang/wa

......@@ -2,7 +2,9 @@
package wat
import "strconv"
import (
"strconv"
)
// 模块对象
type Module struct {
......@@ -63,7 +65,11 @@ func (m *Module) String() string {
s += "(data (i32.const 0) \""
for _, d := range m.DataSeg {
s += "\\"
s += strconv.FormatInt(int64(d), 16)
i := strconv.FormatInt(int64(d), 16)
if len(i) < 2 {
i = "0" + i
}
s += i
}
s += "\")\n"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册