From 1111d2e2a029bbd13515cbddab63d28958efbe38 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 22 Jan 2014 09:01:57 -0500 Subject: [PATCH] string.stp: fix str_replace() return Unfortunately, we can't use STAP_RETURN() here because we've been gradually building STAP_RETVALUE from multiple concatenations so using STAP_RETURN() would overwrite the hard work. --- tapset/string.stp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tapset/string.stp b/tapset/string.stp index e27f055d8..4d0e2f7e2 100644 --- a/tapset/string.stp +++ b/tapset/string.stp @@ -140,7 +140,8 @@ function str_replace:string (prnt_str:string, srch_str:string, rplc_str:string) ptr_base = ptr; } - STAP_RETURN (ptr_base); + strlcat(STAP_RETVALUE, ptr_base, MAXSTRINGLEN); + return; %} /** -- 2.43.5