ParseFromString failed with gtest

16 views
Skip to first unread message

Harry Liang Violin

unread,
Apr 18, 2023, 4:07:47 AM4/18/23
to Protocol Buffers
I met an issue but can't find any relevant answer.
I use visual studio 2022 to build a protobuf library, but when I call ParseFromString, it failed when gtest is included.
When I call ParseFromString from a non gtest  project, it worked well.
I noticed that with gtest, the parameter for ParseFromString has been changed outside and inside this function.
This is the string passed to ParseFromString 
Capture.JPG
This is the string inside called ParseFromString:
Capture.JPG

It works fine with "res = kaesConfig.ParseFromArray(str.c_str(), str.size());"
Thanks!

Reply all
Reply to author
Forward
0 new messages