Skip to content

Commit

Permalink
fixed(ilog): fixed ilog crash
Browse files Browse the repository at this point in the history
Signed-off-by: itas109 <itas109@qq.com>
  • Loading branch information
itas109 committed Feb 10, 2025
1 parent 632ce67 commit 95ff608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/CSerialPort/ilog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class ILog
itas109::IUtils::strFormat(filePath, 256, "/data/data/%s/%s", packageName.c_str(), fileName);
LOGI("log file path: %s", filePath);
#else
itas109::IUtils::strFormat(filePath, 256, "%s", fileName);
itas109::IUtils::strncpy(filePath, fileName, 256);
#endif
m_logFile.open(filePath, std::ios::out | std::ios::app);
if (!m_logFile.is_open())
Expand Down

0 comments on commit 95ff608

Please sign in to comment.