From a8c18f525b90b47e6c91f01e98f4b5b62f205ad6 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Fri, 21 Jun 2019 11:49:25 +0000 Subject: [PATCH] fixed a format specifier bug for a string in moo_fmt_object_() --- moo/kernel/test-002.moo | 2 -- moo/lib/fmt.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/moo/kernel/test-002.moo b/moo/kernel/test-002.moo index 3794122..abc6549 100644 --- a/moo/kernel/test-002.moo +++ b/moo/kernel/test-002.moo @@ -155,8 +155,6 @@ class MyObject(Object) tb := tc at: idx. System log(System.Log.INFO, idx asString, (if (tb value) { ' PASS' } else { ' FAIL' }), S'\n'). ]. - -'AAAAAAAAAAAAAAAAAAAAAaa' dump. } } diff --git a/moo/lib/fmt.c b/moo/lib/fmt.c index a1882be..d82b11c 100644 --- a/moo/lib/fmt.c +++ b/moo/lib/fmt.c @@ -1503,7 +1503,7 @@ int moo_fmt_object_ (moo_fmtout_t* fmtout, moo_oop_t oop) } else { - if (moo_bfmt_out(fmtout, ((c == moo->_symbol)? "#%.*js": "'%.%js'"), MOO_OBJ_GET_SIZE(oop), MOO_OBJ_GET_CHAR_SLOT(oop)) <= -1) return -1; + if (moo_bfmt_out(fmtout, ((c == moo->_symbol)? "#%.*js": "'%.*js'"), MOO_OBJ_GET_SIZE(oop), MOO_OBJ_GET_CHAR_SLOT(oop)) <= -1) return -1; } } else if (MOO_OBJ_GET_FLAGS_TYPE(oop) == MOO_OBJ_TYPE_BYTE)