From f1d283e941680a97d74a2fb7f6bcdd9490efc394 Mon Sep 17 00:00:00 2001
From: nancy.liao <huihui.liao@greentest.com.cn>
Date: 周四, 29 5月 2025 18:14:27 +0800
Subject: [PATCH] 根据具体需求 修改了一个强制性的版本匹配,否则license返回结果不正确

---
 src/library/base/string_utils.cpp |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/library/base/string_utils.cpp b/src/library/base/string_utils.cpp
index 1d5d27b..1736863 100644
--- a/src/library/base/string_utils.cpp
+++ b/src/library/base/string_utils.cpp
@@ -13,7 +13,7 @@
 #include <algorithm>
 #include <stdexcept>
 #include <regex>
-#include "StringUtils.h"
+#include "string_utils.h"
 
 #ifdef _WIN32
 #include <time.h>  //mktime under windows
@@ -107,4 +107,17 @@
 	return count;
 }
 
+size_t mstrlcpy(char *dst, const char *src, size_t n) {
+	size_t n_orig = n;
+	if (n > 0) {
+		char *pd;
+		const char *ps;
+
+		for (--n, pd = dst, ps = src; n > 0 && *ps != '\0'; --n, ++pd, ++ps) *pd = *ps;
+
+		*pd = '\0';
+	}
+
+	return n_orig - n;
+}
 } /* namespace license */

--
Gitblit v1.9.1