forked from Ports/perfect_dark
port: net: don't die when there's a % in a chat message
This commit is contained in:
1 parent
188faeecf6
commit
f6ee8bbf71
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -868,7 +868,7 @@ void netChat(const char *text)
|
||||
}
|
||||
|
||||
if (g_NetMode == NETMODE_SERVER) {
|
||||
sysLogPrintf(LOG_CHAT, tmp);
|
||||
sysLogPrintf(LOG_CHAT, "%s", tmp);
|
||||
netmsgSvcChatWrite(&g_NetMsgRel, tmp);
|
||||
} else {
|
||||
netmsgClcChatWrite(&g_NetMsgRel, tmp);
|
||||
|
||||
@@ -221,7 +221,7 @@ u32 netmsgClcChatRead(struct netbuf *src, struct netclient *srccl)
|
||||
char tmp[1024];
|
||||
const char *msg = netbufReadStr(src);
|
||||
if (msg && !src->error) {
|
||||
sysLogPrintf(LOG_CHAT, msg);
|
||||
sysLogPrintf(LOG_CHAT, "%s", msg);
|
||||
netbufStartWrite(&g_NetMsgRel);
|
||||
netmsgSvcChatWrite(&g_NetMsgRel, msg);
|
||||
netSend(NULL, &g_NetMsgRel, true, NETCHAN_DEFAULT);
|
||||
@@ -341,7 +341,7 @@ u32 netmsgSvcChatRead(struct netbuf *src, struct netclient *srccl)
|
||||
char tmp[1024];
|
||||
const char *msg = netbufReadStr(src);
|
||||
if (msg && !src->error) {
|
||||
sysLogPrintf(LOG_CHAT, msg);
|
||||
sysLogPrintf(LOG_CHAT, "%s", msg);
|
||||
}
|
||||
return src->error;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user