Clean up remnant magic labels.
[open-adventure.git] / dungeon.c
index 4279dc90fc297cca51a9876ed1efbee3ef014108..b22997da7c394b1d9d164f16ded7499697e8ae06 100644 (file)
--- a/dungeon.c
+++ b/dungeon.c
@@ -29,7 +29,6 @@ static long LNLENG;
 static long LNPOSN;
 static char INLINE[LINESIZE+1];
 static long OLDLOC;
-static long MAXDIE;
 
 // Storage for what comes out of the database
 long LINUSE;
@@ -198,7 +197,7 @@ void MAPLIN(FILE *OPENED) {
   while (!feof(OPENED) && INLINE[1] == '#');
 
   LNLENG = 0;
-  for (size_t i = 1; i <= sizeof(INLINE) && INLINE[i] != 0; ++i)
+  for (size_t i = 1; i < sizeof(INLINE) && INLINE[i] != 0; ++i)
     {
       char val = INLINE[i];
       INLINE[i] = ascii_to_advent[(unsigned)val];
@@ -215,7 +214,7 @@ long GETNUM(FILE *source) {
  *  scanned).  If we're at the end of the line or encounter an illegal
  *  character (not a digit, hyphen, or blank), we return 0. */
 
-  long DIGIT, GETNUM, SIGN;
+  long GETNUM, SIGN;
 
   if(source != NULL) MAPLIN(source);
   GETNUM = 0;
@@ -236,7 +235,7 @@ long GETNUM(FILE *source) {
     }
   while (!(LNPOSN > LNLENG || INLINE[LNPOSN] == 0))
     {
-      DIGIT=INLINE[LNPOSN]-64;
+      long DIGIT=INLINE[LNPOSN]-64;
       if(DIGIT < 0 || DIGIT > 9)
         {
           GETNUM=0;