From f40a4a5ee176613f13197341a8f2420fe11fbaab Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Wed, 20 May 2020 14:25:41 +0000 Subject: [PATCH] fixed wrong length type in moo_copy_uchars_to_ucstr() and moo_copy_bchars_to_bcstr() --- moo/lib/moo-utl.h | 4 ++-- moo/lib/utl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/moo/lib/moo-utl.h b/moo/lib/moo-utl.h index 962dd4a..4297cca 100644 --- a/moo/lib/moo-utl.h +++ b/moo/lib/moo-utl.h @@ -465,14 +465,14 @@ MOO_EXPORT moo_oow_t moo_copy_bcstr ( MOO_EXPORT moo_oow_t moo_copy_uchars_to_ucstr ( moo_uch_t* dst, - moo_uch_t dlen, + moo_oow_t dlen, const moo_uch_t* src, moo_oow_t slen ); MOO_EXPORT moo_oow_t moo_copy_bchars_to_bcstr ( moo_bch_t* dst, - moo_bch_t dlen, + moo_oow_t dlen, const moo_bch_t* src, moo_oow_t slen ); diff --git a/moo/lib/utl.c b/moo/lib/utl.c index d05479e..ddcfacd 100644 --- a/moo/lib/utl.c +++ b/moo/lib/utl.c @@ -272,7 +272,7 @@ void moo_copy_uchars_to_bchars (moo_bch_t* dst, const moo_uch_t* src, moo_oow_t for (i = 0; i < len; i++) dst[i] = src[i]; } -moo_oow_t moo_copy_uchars_to_ucstr (moo_uch_t* dst, moo_uch_t dlen, const moo_uch_t* src, moo_oow_t slen) +moo_oow_t moo_copy_uchars_to_ucstr (moo_uch_t* dst, moo_oow_t dlen, const moo_uch_t* src, moo_oow_t slen) { moo_oow_t i; if (dlen <= 0) return 0; @@ -282,7 +282,7 @@ moo_oow_t moo_copy_uchars_to_ucstr (moo_uch_t* dst, moo_uch_t dlen, const moo_uc return i; } -moo_oow_t moo_copy_bchars_to_bcstr (moo_bch_t* dst, moo_bch_t dlen, const moo_bch_t* src, moo_oow_t slen) +moo_oow_t moo_copy_bchars_to_bcstr (moo_bch_t* dst, moo_oow_t dlen, const moo_bch_t* src, moo_oow_t slen) { moo_oow_t i; if (dlen <= 0) return 0;