diff --git a/utils/funcexp/func_replace.cpp b/utils/funcexp/func_replace.cpp index 4f72ac195..751e7bb36 100644 --- a/utils/funcexp/func_replace.cpp +++ b/utils/funcexp/func_replace.cpp @@ -173,7 +173,7 @@ std::string Func_replace::getStrVal(rowgroup::Row& row, } } // Copy in the trailing src chars. - newstr.append(src, ptr - src); + newstr.append(src, srcEnd - src); } return newstr; }