(svn r14431) -Fix (r14414): alias parameter "evaluation" would remove the last byte of the parameters.

This commit is contained in:
rubidium 2008-10-02 00:08:45 +00:00
parent ba5575e0fc
commit d19d6f21a0
1 changed files with 3 additions and 2 deletions

View File

@ -388,8 +388,9 @@ IConsoleAlias *IConsoleAliasGet(const char *name)
/** copy in an argument into the aliasstream */ /** copy in an argument into the aliasstream */
static inline int IConsoleCopyInParams(char *dst, const char *src, uint bufpos) static inline int IConsoleCopyInParams(char *dst, const char *src, uint bufpos)
{ {
int len = min(ICON_MAX_STREAMSIZE - bufpos, (uint)strlen(src)); /* len is the amount of bytes to add excluding the '\0'-termination */
strecpy(dst, src, dst + len - 1); int len = min(ICON_MAX_STREAMSIZE - bufpos - 1, (uint)strlen(src));
strecpy(dst, src, dst + len);
return len; return len;
} }