]> code.citadel.org Git - citadel.git/blobdiff - citadel/commands.c
* Changed some of the rev-level sensitive stuff to look at the actual version
[citadel.git] / citadel / commands.c
index da810085c8d351a6ec501f911e80d3c4641ccbdd..3a6fb8af6681f3a53cac56cc76cc2c4f61547f8f 100644 (file)
@@ -40,6 +40,7 @@
 #include "routines.h"
 #include "routines2.h"
 #include "tools.h"
+#include "rooms.h"
 #ifndef HAVE_SNPRINTF
 #include "snprintf.h"
 #endif
@@ -485,7 +486,9 @@ int intprompt(char *prompt, int ival, int imin, int imax)
                strprompt(prompt, buf, 15);
                i = atoi(buf);
                for (p=0; p<strlen(buf); ++p) {
-                       if (!isdigit(buf[p])) i = imin - 1;
+                       if ( (!isdigit(buf[p]))
+                          && ( (buf[p]!='-') || (p!=0) )  )
+                               i = imin - 1;
                }
                if (i < imin)
                        printf("*** Must be no less than %d.\n", imin);