Skip to content

Commit

Permalink
Merge pull request #18644 from dcamper/hpcc-31820-regex-fixes-master
Browse files Browse the repository at this point in the history
HPCC-31820 Unicode regex errors displayed with garbage at the end

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored May 15, 2024
2 parents e42e65c + 1f45a83 commit 3ae0d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtl/eclrtl/eclregex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void failWithUPCRE2Error(int errCode, const char * msgPrefix, const UChar
char * regexStr = nullptr;
unsigned regexStrLen;
rtlUnicodeToEscapedStrX(regexStrLen, regexStr, rtlUnicodeStrlen(regex), regex);
regexPattern += regexStr;
regexPattern = std::string(regexStr, regexStrLen);
rtlFree(regexStr);
}
failWithPCRE2Error(errCode, msgPrefix, regexPattern.c_str(), errOffset);
Expand Down

0 comments on commit 3ae0d53

Please sign in to comment.