changed Makefile; build all commands as an own file
[NeonServV5.git] / tools.c
diff --git a/tools.c b/tools.c
index fb74d5b0caf2bf4fd91a01560cc9ecdbc49311af..097684855d8230a66cb21819ceb9240dce68a5cb 100644 (file)
--- 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;
 }