Simplify seed and waste cpmands using %d in the YAML string.
[open-adventure.git] / actions.c
index 0a67cf43c6866ee88fee11ee0443934ef8f74428..7faf3313e25fb5b5f53ad0efb849e331d12605f9 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1247,8 +1247,8 @@ static int wake(verb_t verb, obj_t obj)
 static int seed(verb_t verb, const char *arg)
 /* Set seed */
 {
-    long seed = atol(arg);
-    speak(actions[verb].message, arg);
+    int seed = atoi(arg);
+    speak(actions[verb].message, seed);
     set_seed(seed);
     --game.turns;
     return GO_TOP;
@@ -1258,9 +1258,7 @@ static int waste(verb_t verb, turn_t turns)
 /* Burn turns */
 {
     game.limit -= turns;
-    char newlim[1024];
-    sprintf(newlim, "%ld", (long)game.limit);
-    speak(actions[verb].message, newlim);
+    speak(actions[verb].message, (int)game.limit);
     return GO_TOP;
 }