fixed a bug in matching string end with $
This commit is contained in:
parent
0581258f94
commit
342c7ff32f
@ -1274,12 +1274,15 @@ static int __substitute (qse_awk_rtx_t* rtx, qse_awk_int_t max_count)
|
||||
skip_one_char:
|
||||
/* special treatment is needed if match length is 0 */
|
||||
|
||||
if (cur.ptr < s2_end)
|
||||
{
|
||||
m = qse_str_ncat (&new, cur.ptr, 1);
|
||||
if (m == (qse_size_t)-1)
|
||||
{
|
||||
qse_awk_rtx_seterrnum (rtx, QSE_AWK_ENOMEM, QSE_NULL);
|
||||
goto oops;
|
||||
}
|
||||
}
|
||||
|
||||
cur.ptr++; cur.len--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user