diff --git a/hawk/lib/utl-str.c b/hawk/lib/utl-str.c index 839463d3..8562f446 100644 --- a/hawk/lib/utl-str.c +++ b/hawk/lib/utl-str.c @@ -375,7 +375,7 @@ hawk_oow_t hawk_copy_bchars_to_bcstr_unlimited (hawk_bch_t* dst, const hawk_bch_ return i; } -hawk_oow_t hawk_copy_ucstr_to_uchars (hawk_uch_t* dst, hawk_oow_t dlen, const hawk_uch_t* src) +hawk_oow_t hawk_copy_ucstr_to_uchars (hawk_uch_t* dst, hawk_oow_t dlen, const hawk_uch_t* src) { /* no null termination */ hawk_uch_t* p, * p2; @@ -391,7 +391,7 @@ hawk_oow_t hawk_copy_ucstr_to_uchars (hawk_uch_t* dst, hawk_oow_t dlen, const h return p - dst; } -hawk_oow_t hawk_copy_bcstr_to_bchars (hawk_bch_t* dst, hawk_oow_t dlen, const hawk_bch_t* src) +hawk_oow_t hawk_copy_bcstr_to_bchars (hawk_bch_t* dst, hawk_oow_t dlen, const hawk_bch_t* src) { /* no null termination */ hawk_bch_t* p, * p2; diff --git a/hawk/t/t-005.c b/hawk/t/t-005.c index 5c37d534..a1532191 100644 --- a/hawk/t/t-005.c +++ b/hawk/t/t-005.c @@ -86,13 +86,15 @@ hawk_bch_t* subst (hawk_bch_t* buf, hawk_oow_t bsz, const hawk_bcs_t* ident, voi return buf + ((buf == HAWK_SUBST_NOBUF)? 3: hawk_copy_bcstr_to_bchars(buf, bsz, "sam")); } else if (hawk_comp_bchars_bcstr(ident->ptr, ident->len, "GROUP") == 0) + { return buf + ((buf == HAWK_SUBST_NOBUF)? 6: hawk_copy_bcstr_to_bchars(buf, bsz, "coders")); + } return buf; } static int test3 (void) { - hawk_bch_t buf[25], * ptr; + hawk_bch_t buf[512], * ptr; hawk_oow_t n; n = hawk_subst_for_bcstr_to_bcstr (buf, HAWK_COUNTOF(buf), "user=${USER},group=${GROUP}", subst, HAWK_NULL); T_ASSERT0 (n == 21);