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

View File

@@ -215,12 +215,12 @@ int bufsz;
if ((bufsz - cnt) <= 2) return callerbuf;
if (*sp == quotechar) {
sp++;
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break;
if (k >= 15) return callerbuf; /* impossible, so bail */
for (k=0; k < 16; ++k) if (*sp == hexdigits[k]) break;
if (k >= 16) return callerbuf; /* impossible, so bail */
calc = k << 4;
sp++;
for (k=0; k < 15; ++k) if (*sp == hexdigits[k]) break;
if (k >= 15) return callerbuf; /* impossible, so bail */
for (k=0; k < 16; ++k) if (*sp == hexdigits[k]) break;
if (k >= 16) return callerbuf; /* impossible, so bail */
calc += k;
sp++;
*op++ = calc;