another follow-up to fname_decode() routine

This commit is contained in:
nethack.allison
2002-07-21 16:58:12 +00:00
parent 2161fbe18c
commit 4957a7f5be
+4 -4
View File
@@ -215,12 +215,12 @@ int bufsz;
if ((bufsz - cnt) <= 2) return callerbuf; if ((bufsz - cnt) <= 2) return callerbuf;
if (*sp == quotechar) { if (*sp == quotechar) {
sp++; sp++;
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break; for (k=0; k < 16; ++k) if (*sp == hexdigits[k]) break;
if (k >= 15) return callerbuf; /* impossible, so bail */ if (k >= 16) return callerbuf; /* impossible, so bail */
calc = k << 4; calc = k << 4;
sp++; sp++;
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break; for (k=0; k < 16; ++k) if (*sp == hexdigits[k]) break;
if (k >= 15) return callerbuf; /* impossible, so bail */ if (k >= 16) return callerbuf; /* impossible, so bail */
calc += k; calc += k;
sp++; sp++;
*op++ = calc; *op++ = calc;