summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-09 17:45:51 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-09 17:45:51 +0000
commit486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df (patch)
tree32032934e3a8954081c78757268b6d581e01be39 /src/map/map.h
parent6b37d26f7557bb6318e046fac461c05751c3f149 (diff)
downloadhercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.gz
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.bz2
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.xz
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.zip
* Corrected string lengths according to bugreport:198
- CHATBOX_SIZE: 70 -> 70+1 - removed some too aggressive checks in clif_parse_globalmessage() - removed CHAT_SIZE define as it actually doesn't apply anywhere - added CHAT_SIZE_MAX to serve as a custom limit to input string lengths - added length/contents checks to /b and /lb (against fake names) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11386 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 6887098d9..679fd8529 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -163,16 +163,15 @@ enum {
MAPID_BABY_SOUL_LINKER,
};
-//Max size when inputting a string with those 'npc input boxes'
-//(also used for Graffiti, Talkie Box, Vending, and Chatrooms)
-#define MESSAGE_SIZE 80
+//Max size for inputs to Graffiti, Talkie Box and Vending text prompts
+#define MESSAGE_SIZE (79 + 1)
//String length you can write in the 'talking box'
-#define CHATBOX_SIZE 70
-//Talk max size: <name> : <message of 70> [Skotlex]
-#define CHAT_SIZE (NAME_LENGTH + 3 + CHATBOX_SIZE)
+#define CHATBOX_SIZE (70 + 1)
//Chatroom-related string sizes
#define CHATROOM_TITLE_SIZE (36 + 1)
#define CHATROOM_PASS_SIZE (8 + 1)
+//Max allowed chat text length
+#define CHAT_SIZE_MAX 150
#define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
@@ -610,7 +609,7 @@ struct map_session_data {
int npc_menu;
int npc_amount;
struct script_state *st;
- char npc_str[256];
+ char npc_str[CHATBOX_SIZE]; // for passing npc input box text to script engine
int npc_timer_id; //For player attached npc timers. [Skotlex]
unsigned int chatID;
time_t idletime;