summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-12 01:09:30 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-12 01:09:30 +0000
commitaace438194ba1da0b99ed68ae2568a67c212782c (patch)
treed7a6de52990581b74c125a068922df6cf5d9d674 /src
parentace66fdabfb289716f5c9e1ec65b5c24f706db0d (diff)
downloadhercules-aace438194ba1da0b99ed68ae2568a67c212782c.tar.gz
hercules-aace438194ba1da0b99ed68ae2568a67c212782c.tar.bz2
hercules-aace438194ba1da0b99ed68ae2568a67c212782c.tar.xz
hercules-aace438194ba1da0b99ed68ae2568a67c212782c.zip
Fixed bug with @commands/@charcommands not displaying aliases
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15433 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index cf12836e3..f27fa0026 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -55,9 +55,10 @@ char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 50
DBMap* atcommand_db = NULL;//name -> AtCommandInfo
-typedef struct AtCommandInfo
-{
- const char* command;
+#define ATCOMMAND_LENGTH 50
+
+typedef struct AtCommandInfo {
+ char command[ATCOMMAND_LENGTH];
int level;
int level2;
AtCommandFunc func;
@@ -9063,7 +9064,7 @@ void atcommand_basecommands(void) {
CREATE(atcommand, AtCommandInfo, 1);
- atcommand->command = atcommand_base[i].command;
+ safestrncpy(atcommand->command,atcommand_base[i].command,sizeof(atcommand->command));
atcommand->level = atcommand_base[i].level;
atcommand->level2 = atcommand_base[i].level2;
atcommand->func = atcommand_base[i].func;
@@ -9268,7 +9269,7 @@ void atcommand_parse_aliases(char aliases[1024],AtCommandInfo* base) {
CREATE(atcommand, AtCommandInfo, 1);
- atcommand->command = str[i];
+ safestrncpy(atcommand->command,str[i],sizeof(atcommand->command));
atcommand->level = base->level;
atcommand->level2 = base->level2;
atcommand->func = base->func;