diff --git a/qse/include/qse/cmn/str.h b/qse/include/qse/cmn/str.h index 22a4d51c..a3f7b1db 100644 --- a/qse/include/qse/cmn/str.h +++ b/qse/include/qse/cmn/str.h @@ -2509,7 +2509,7 @@ QSE_EXPORT int qse_wcsspl ( * QSE_MT('\\'), QSE_MT("n\nr\r") * ); * \endcode - * Given [xxx]:[\rabc\ndef]:[] as an input, the example breaks the second + * Given [xxx]:[\rabc\ndef]:[] as an input, the example translates the second * fields to abcdef where is a carriage return and is a * new line. * diff --git a/qse/lib/cmn/pio.c b/qse/lib/cmn/pio.c index 402a4662..c801b881 100644 --- a/qse/lib/cmn/pio.c +++ b/qse/lib/cmn/pio.c @@ -289,12 +289,18 @@ static int make_param ( qse_mchar_t** argv; qse_mchar_t* mcmdptr; - param->argv = QSE_MMGR_ALLOC ( - pio->mmgr, (fcnt + 1) * QSE_SIZEOF(argv[0])); - if (param->argv == QSE_NULL) + if (fcnt < QSE_COUNTOF(param->fixed_argv)) { - pio->errnum = QSE_PIO_ENOMEM; - goto oops; + param->argv = param->fixed_argv; + } + else + { + param->argv = QSE_MMGR_ALLOC (pio->mmgr, (fcnt + 1) * QSE_SIZEOF(argv[0])); + if (param->argv == QSE_NULL) + { + pio->errnum = QSE_PIO_ENOMEM; + goto oops; + } } mcmdptr = mcmd; diff --git a/qse/lib/cmn/str-spl.c b/qse/lib/cmn/str-spl.c index c00dcdfc..e70c2fd2 100644 --- a/qse/lib/cmn/str-spl.c +++ b/qse/lib/cmn/str-spl.c @@ -297,7 +297,7 @@ int qse_mbsspltrn ( } p++; } -exit_point: +exit_point: ; } } @@ -583,7 +583,7 @@ int qse_wcsspltrn ( } p++; } -exit_point: +exit_point: ; } }