--- deliantra/server/include/util.h 2009/01/03 01:04:19 1.86 +++ deliantra/server/include/util.h 2009/01/12 03:40:21 1.87 @@ -678,13 +678,14 @@ }; // basically does what strncpy should do, but appends "..." to strings exceeding length -void assign (char *dst, const char *src, int maxlen); +// returns the number of bytes actually used (including \0) +int assign (char *dst, const char *src, int maxsize); // type-safe version of assign template -inline void assign (char (&dst)[N], const char *src) +inline int assign (char (&dst)[N], const char *src) { - assign ((char *)&dst, src, N); + return assign ((char *)&dst, src, N); } typedef double tstamp;