From 387fe1dbfffdc3d73cf46f2c054f4d25543c8523 Mon Sep 17 00:00:00 2001
From: Fu Juntang <StrongTiger_001@163.com>
Date: 星期三, 01 九月 2021 10:55:35 +0800
Subject: [PATCH] Fix the building issue when protobuf is enabled.

---
 src/bh_api.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/bh_api.cpp b/src/bh_api.cpp
index f707e6f..5fedc83 100644
--- a/src/bh_api.cpp
+++ b/src/bh_api.cpp
@@ -797,7 +797,7 @@
 #if defined(PRO_DE_SERIALIZE)   
     for (i = 0; i < _input.amount; i++) {
       len = strlen(_input.topics[i]);
-      strncpy(topics_buf + count, _input.topics[i], min);
+      strncpy(topics_buf + count, _input.topics[i], len);
       
       count += len;
 

--
Gitblit v1.8.0