X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=tools.c;h=097684855d8230a66cb21819ceb9240dce68a5cb;hb=795115bf680185ae01043bd1222b78bfed8c1d87;hp=fb74d5b0caf2bf4fd91a01560cc9ecdbc49311af;hpb=98d4daa7d6cf62fe4d82b513a788ed3f7cc0da67;p=NeonServV5.git diff --git a/tools.c b/tools.c index fb74d5b..0976848 100644 --- a/tools.c +++ b/tools.c @@ -5,8 +5,8 @@ #include "ClientSocket.h" static const struct default_language_entry msgtab[] = { - {"TIME_MASK_2_ITEMS", "%s and %s"}, - {"TIME_MASK_3_ITEMS", "%s, %s and %s"}, + {"TIME_MASK_2_ITEMS", "%s and %s"}, /* {ARGS: "2 days", "1 hour"} */ + {"TIME_MASK_3_ITEMS", "%s, %s and %s"}, /* {ARGS: "2 days", "1 hour", "20 minutes"} */ {"TIME_YEAR", "year"}, {"TIME_YEARS", "years"}, {"TIME_MONTH", "month"}, @@ -259,7 +259,7 @@ char* timeToStr(struct UserNode *user, int seconds, int items, char *buf) { } buf[p++] = ' '; } - buf[p-1] = '\0'; + buf[(p ? p-1 : 0)] = '\0'; } return buf; }