• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

密猟オンラインサーバープログラム


Commit MetaInfo

Revision13 (tree)
Time2016-12-21 18:06:09
Authormanjihq

Log Message

キャラクター死亡時のメッセージが正常に表示されないのを修正

Change Summary

Incremental Difference

--- trunk/huntserv.c (revision 12)
+++ trunk/huntserv.c (revision 13)
@@ -8582,6 +8582,7 @@
85828582 /* anyone kill you */
85838583 char work[MESG_BUFFER];
85848584 const char *pname;
8585+ int name_len;
85858586 int nuser = User[i].lastuser;
85868587 if (User[i].lastuser_type == TargetUser)
85878588 {
@@ -8593,15 +8594,19 @@
85938594 {
85948595 case TargetUser:
85958596 pname = User[nuser].name;
8597+ name_len = sizeof (User[nuser].name);
85968598 break;
85978599 case TargetNpc:
85988600 pname = Npc[nuser].name;
8601+ name_len = sizeof (Npc[nuser].name);
85998602 break;
86008603 case TargetAnimal:
86018604 pname = Animal[nuser].name;
8605+ name_len = sizeof (Animal[nuser].name);
86028606 break;
86038607 default:
86048608 pname = NULL;
8609+ name_len = 0;
86058610 break;
86068611 }
86078612 if (pname != NULL)
@@ -8608,7 +8613,7 @@
86088613 {
86098614 sprintf (work,
86108615 MESG ("[You were killed by %-.24s]"),
8611- CUTTAIL (pname));
8616+ cut_tail (pname, name_len));
86128617 SendSystemMessagePacket (i, work);
86138618 }
86148619 if (User[i].lastuser_type == TargetUser)