diff options
author | Kpy! <ouroboros.ai@gmail.com> | 2015-04-08 17:19:36 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-20 20:05:04 +0100 |
commit | 6a8fdfaae0bcfd230109019484e568edf15570eb (patch) | |
tree | b55e8ada86455d9f3ef0ff2445dca7e1d6e1b2df /src/map/atcommand.c | |
parent | b9c2af357dba7a6281f32517603b49e2cb682c53 (diff) | |
download | hercules-6a8fdfaae0bcfd230109019484e568edf15570eb.tar.gz hercules-6a8fdfaae0bcfd230109019484e568edf15570eb.tar.bz2 hercules-6a8fdfaae0bcfd230109019484e568edf15570eb.tar.xz hercules-6a8fdfaae0bcfd230109019484e568edf15570eb.zip |
Fix some issues with the @help command.
Fix help messages being trimmed due to an incorrect length value.
Fix help messages formatting: use clif_displaymessage2 to properly display newlines.
Closes #491 as merged
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 889deac49..b284323fd 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1531,7 +1531,7 @@ ACMD(help) { } // Display help contents - clif->message(fd, tinfo->help); + clif->messageln(fd, tinfo->help); return true; } @@ -10092,8 +10092,8 @@ void atcommand_config_read(const char* config_filename) { if( commandinfo->help == NULL ) { const char *str = libconfig->setting_get_string(command); size_t len = strlen(str); - commandinfo->help = aMalloc( len * sizeof(char) ); - safestrncpy(commandinfo->help, str, len); + commandinfo->help = aMalloc(len + 1); + safestrncpy(commandinfo->help, str, len + 1); } } } |