Skip to content

Commit

Permalink
Fix missing "\n" at each message or log sent in Plugin_Remote.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeAkinobu committed Feb 13, 2024
1 parent 94db0c4 commit b9d77cd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Plugin_Remote/Plugin_Remote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1359,10 +1359,11 @@ EXPORT void extProcMessage(MMDAgent *mmdagent, const char *type, const char *arg
if (enabled == true) {
if (MMDAgent_strlen(type) > 0) {
if (MMDAgent_strlen(args) > 0) {
MMDAgent_snprintf(buff, MMDAGENT_MAXBUFLEN, "%s|%s", type, args);
MMDAgent_snprintf(buff, MMDAGENT_MAXBUFLEN, "%s|%s\n", type, args);
plugin.enqueueLogString(buff);
} else {
plugin.enqueueLogString(type);
MMDAgent_snprintf(buff, MMDAGENT_MAXBUFLEN, "%s\n", type);
plugin.enqueueLogString(buff);
}
}
}
Expand Down Expand Up @@ -1410,10 +1411,14 @@ EXPORT void extRender2D(MMDAgent *mmdagent, float screenWidth, float screenHeigh
/* extLog: process log string */
EXPORT void extLog(MMDAgent *mmdagent, int id, unsigned int flag, const char *text, const char *fulltext)
{
char buff[MMDAGENT_MAXBUFLEN];

if (configured == false)
return;
if (send_log == true)
plugin.enqueueLogString(fulltext);
if (send_log == true) {
MMDAgent_snprintf(buff, MMDAGENT_MAXBUFLEN, "%s\n", fulltext);
plugin.enqueueLogString(buff);
}
}

/* extAppEnd: end of application */
Expand Down

0 comments on commit b9d77cd

Please sign in to comment.